Is it possible to use dynamic arrays in gpc?

Ohonin Yuriy yuriy at krk.ru
Tue Feb 5 05:43:49 CET 2008


Hello.

I'm trying to use such a code:

type
	TVar = object
		param1, param2:string;
		....
	end;

	TVarList = object
		Items:array of TVar;
		count:cardinal;
		.....
	end;

In Delphi  and FPC it works fine, but in GPC i get an error

45: warning: missing string capacity -- assuming 255
49: error: syntax error before `of'

Is it possible to use dynamic arrays in gpc?
I had searched gpc manual, but it is not clear for me - may be, it is
 possible to use dynamic array only as function parametr? It seems to be a
 little strange - dynamic arrays are a very old feature :(


--
Best regards, Yuriy Ohonin.





More information about the Gpc mailing list