On 16 Jun 97 Jeroen van Rooij said to Mike Jolls...
Jv> Do it this way and it will work and it's much easyer to understand:
Jv> const
Jv> Key = ['O'..'9', '*', '#' ];
Jv> var
Jv> userinput : char;
Jv> begin
Jv> Read(userinput);
Jv> if userinput in Key then
The problem with doing it that way - at least with Turbo Pascal 7 - is that
the code generated wastes time re-constructing that set of characters every
time you hit it. Slowly, too - it adds the characters to the set one-by-one.
If your test is inside a loop, that may not be a wise thing to do.
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)
|