Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-01

Arrays

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

James Mills

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 ?

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

cheers
James

Reply by email

Peter Vreman
to James Mills
Show quoted text 13 lines
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 ?

Only in 1.1

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

TStringList is available in the FCL

Reply by email

Michael Van Canneyt
to James Mills: var tmpA: String; AA: String; tmpB: String; BB: String; DP: Integer;…
James Mills wrote 13 lines
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.

Reply by email

Florian Klaempfl
to Michael Van Canneyt
Michael Van Canneyt wrote 8 lines
> 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

Version 1.0.x you mean of course :)

Show quoted text 8 lines
Type PString = ^String; tmpX : PString; GetMem(tmpX,Count*SizeOf(Pstring)); Tmpx[0]:=''; Tmpx[Count-1]:='Something';

Reply by email

James Mills
to Peter Vreman: Only in 1.1 TStringList is available in the FCL
Peter Vreman wrote 20 lines
> 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 ? Only in 1.1 > Also, is there a similar class like the Delphi TStringList that can be > used with FPC ? TStringList is available in the FCL

Thank you :)

Show quoted text 7 lines
_______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email