[fpc-pascal] Copy and Dynamic Arrays

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Jan 31 09:53:33 CET 2007


Hi,

How do I copy Dynamic Arrays?  I can't do what I used to in Delphi,
using the Copy() function, as FPC keeps telling me I have the wrong
number of parameters.

Doesn't FPC supporting copying dynamic arrays?

I have the following code which works in Delphi

---------------------
procedure TSomeClass.FooBar(AArray: array of string);
var
 lArray: array of string;
begin
  lArray := Copy(AArray);
  .....
end;
---------------------


>From the Kylix help:
------------------------------
Note: When S is a dynamic array, you can omit the Index and Count
parameters and Copy copies the entire array.


-- 
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'



More information about the fpc-pascal mailing list