TIP: Click on subject to list as thread! ANSI
echo: delphi
to: MIKE JOLLS
from: LARS SKOVLUND
date: 1997-06-16 22:13:00
subject: Problem with sets

Hello Mike!
Saturday June 14 1997, Mike Jolls writes to All:
 MJ> I keep getting an error that Delphi is expecting an expression in the
 MJ> SET OF line.  It says it's expecting a "type" but it finds '['.  I've
 MJ> gone over the program and I'm typing it correctly.  Can anybody see a
 MJ> problem with this?
By "type", Delphi actually means a type _name_. When using sets, you must 
declare a base type FIRST... besides, I think the whole type declaration is 
wrong - I'm surprised this made it to the book.
Try changing
 MJ> type
 MJ>   KeysType = set of [O..9, '*', '#'                          ];
                         (^ You have forgotten a ' here)
     const Key : set of char = ['0'..'9','*','#'];
 MJ>   Key       : KeysType;
Delete the above line.
Should work then.
Lars
--- GoldED/386 2.50 UNREG
---------------
* Origin: Yet another T.P.I. Point (2:238/64.46)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.