[Lazarus] Saving an array to a string

Jürgen Hestermann juergen.hestermann at gmx.de
Tue Jul 1 17:24:22 CEST 2014


Am 2014-07-01 17:14, schrieb silvioprog:
> procedure TForm1.Button1Click(Sender: TObject);
> var
>   ar: array of string;
> begin
>   // your array
>   SetLength(ar, 2);
>   ar[0] := 'abc';
>   ar[1] := 'def';
>   ar[2] := 'ghi';

ar[2] will lead to an error if you set the length
of the array to 2 (only indices 0 and 1 are allowed).






More information about the Lazarus mailing list