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)
|