[fpc-pascal] New Warnings with fpc >= 3.2.0

Michael Van Canneyt michael at freepascal.org
Wed Mar 11 12:19:09 CET 2020



On Wed, 11 Mar 2020, fredvs via fpc-pascal wrote:

> Re-hello.
>
>> What must be changed, a new constant should be added at end of the array, 
>
> Lot of work because with this the array must be initialized with tak_none.
>
> But maybe there is now a new fpc trick to write:
>
> --> if (kind <> tabulatorkindty(-1))
>
> That will say "if kind is different of something that is not in the array
> tabulatorkindty"
>
> ?
>
> PS: Imho, using "-1" was a nice trick and it is sad that it cannot more be
> used.

Don't use tricks. Do it properly, and add a tab_None or somesuch. 
That should be standard practice.

Michael.


More information about the fpc-pascal mailing list