[fpc-pascal] Feature announcement: Dynamic array extensions
Sven Barth
pascaldragon at googlemail.com
Sun May 20 20:46:13 CEST 2018
Mattias Gaertner <nc-gaertnma at netcologne.de> schrieb am So., 20. Mai 2018,
17:58:
> >[...]
> > === code end ===
> >
> > For constants the dynamic array constants adhere to the writable
> > constants switch $J. E.g. the following will result in an exception:
> >
> > === code begin ===
> >
> > {$J-}
> > const
> > Test1: array of LongInt = (1, 2, 3);
> > begin
> > Test1[1] := 42;
> > end.
>
> This seems to be inconsistent with
>
> procedure Test(const a: TStringDynArray);
> begin
> a[1]:='42';
> end;
>
> Isn't it?
>
But it is consistent with static array constants and that is what counts...
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180520/1582b70e/attachment.html>
More information about the fpc-pascal
mailing list