[fpc-pascal] char in [range]

ik idokan at gmail.com
Mon Dec 7 14:40:00 CET 2009

You are right, my bad.

I wrote it
if (not Key in ['a'..'z']) then

Rather then
if not (Key in ['a'..'z') then

In lazarus under OnKeyPress.

Now it works properly. However it seems like the not is for the "in" rather
then the key if it inside the pertness.



On Mon, Dec 7, 2009 at 3:07 PM, Jonas Maebe <jonas.maebe at elis.ugent.be>wrote:

> On 07 Dec 2009, at 14:01, ik wrote:
>  I'm using FPC 2.5.1 and I'm trying to do the following:
>> if not (Char in ['a'..'z'])
>> however fpc gives me an error of type mismatch for the "in" directive. Why
>> can't I use the in directive on a char ?
> You made a mistake somewhere. *Always* post a source snippet that should be
> compilable when asking about compilation problems.
> Jonas
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20091207/685e844c/attachment.html>

More information about the fpc-pascal mailing list