[fpc-devel] "Blank slate" next version of FPC
Nikolai Zhubr
n-a-zhubr at yandex.ru
Wed Feb 20 20:08:45 CET 2019
Hi,
20.02.2019 18:24, Dimitrios Chr. Ioannidis via fpc-devel:
[...]
>> I'd like to see an example how this is less safe.
>
> Well one of the answer in the Cantu blog has this ( which I changed to
> lets say a "real world" relative big function ) :
How this example is different from e.g. using normally declared "I, J:
Integer" and employing "J" as a loop variable? Wouldn't it do the same
error anyway?
Thank you,
Regards,
Nikolai
> var arr: array...
>
> function Fuckup: boolean;
> var I: Integer;
> begin
>
>
>
> <....> 20 lines of code
>
>
>
> for var I := Low(arr) to High(arr) do
> if arr[I]..... then
> break;
>
>
>
> <....> 20 lines of code
>
>
>
> Result := (I<= High(arr));
> end;
>
> regards,
> --
> Dimitrios Chr. Ioannidis
>
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list