[fpc-pascal] New Warnings with fpc >= 3.2.0
Michael Van Canneyt
michael at freepascal.org
Wed Mar 11 14:06:36 CET 2020
On Wed, 11 Mar 2020, fredvs via fpc-pascal wrote:
> Thanks Michael.
>
>> You'll need to disable that particular warning if you want to use such
>> tricks.
>
> For the "-1" trick, it can be easy fixed with
>
> if (kind = tabulatorkindty(tak_lef)) or (kind = tabulatorkindty(tak_right))
> or (kind = tabulatorkindty(tak_centered)) or (kind =
> tabulatorkindty(tak_decimal)) then
>
> But for the other example:
>
> --> tdataevent(de_afterapplyupdate)
>
> Do you think it would be better to add the "extended" elements of the array
> like
> de_afterapplyupdate:
>
> --> de_afterapplyupdate = ord(high(tdataevent))+6;
>
> Directly in the original tdataevent array?
Yes. The above is just bad programming.
Michael.
More information about the fpc-pascal
mailing list