[fpc-pascal] Feature announcement: Dynamic array extensions

Mattias Gaertner nc-gaertnma at netcologne.de
Sun May 20 17:57:57 CEST 2018


On Sun, 20 May 2018 14:23:25 +0200
Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

> Hello together!
> 
> I'm pleased to announce that after nearly a year various extensions for 
> dynamic arrays have been finished. This includes the following features:
> 
> - support for array constructors using "[...]" syntax
> - support for Insert(), Delete() and Concat()
> - support for "+" operator
> - support for dynamic array constants (and variable initializations)

:)

I hope 3.2 is coming soon.


>[...]
> === 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?
 
Mattias



More information about the fpc-pascal mailing list