[fpc-pascal] Range check error warning.

Sven Barth pascaldragon at googlemail.com
Tue Mar 24 23:58:51 CET 2020


<wkitty42 at windstream.net> schrieb am Di., 24. März 2020, 18:37:

> On 3/24/20 12:40 PM, fredvs via fpc-pascal wrote:
> > Hello Alexander.
> >
> > I did:
> >
> > const
> >     foldhiddenbit : byte = 7; // line 896
> >     foldhiddenmask : byte = 1 shl foldhiddenbit; // line 897
> >     currentfoldhiddenbit : byte = 6; // line 898
> >     currentfoldhiddenmask : byte = 1 shl currentfoldhiddenbit; // line
> 899
> >     foldlevelmask : byte = not (foldhiddenmask or
> currentfoldhiddenmask); //
> > line 900
> >
> > That gives that error messages:
> >
> > msedatalist.pas(897,47) Error: (3203) Illegal expression
> > msedatalist.pas(899,61) Error: (3203) Illegal expression
> > msedatalist.pas(900,72) Error: (3203) Illegal expression
> > msedatalist.pas(1126,1) Fatal: (10026) There were 3 errors compiling
> module,
> > stopping
>
>
> you should figure out why typed constants are not being allowed/used in
> your
> setup...
>

Typed constants can not be used to initialize constants.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20200324/435dff40/attachment-0001.html>


More information about the fpc-pascal mailing list