[fpc-pascal]Arrays

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Jan 7 15:46:08 CET 2003


On Wed, 8 Jan 2003, James Mills wrote:

> Hi,
>
> var
>    tmpA:    String;
>    AA:      String;
>    tmpB:    String;
>    BB:      String;
>    DP:      Integer;
>    X:       String;
>    tmp:     String;
>    tmpX:    Array of String;
>
> Can arrays like that of tmpX be used in FPC ?

Yes. version 1.1 fully supports dynamic arrays.

In version 1.1 you would need something like

Type
  PString = ^String;
  tmpX : PString;

GetMem(tmpX,Count*SizeOf(Pstring));
Tmpx[0]:='';
Tmpx[Count-1]:='Something';


>
> Also, is there a similar class like the Delphi TStringList that can be
> used with FPC ?

The Delphi Classes unit is fully suported with the exception of
TTHreads.

Michael.





More information about the fpc-pascal mailing list