On Tue, 22 Jan 2008, Joao Morais wrote:

> 
> Hello,
> 
> I need to send an unknown amount of elements to the Format function (actually
> objects within a tlist decendant). I apparently cannot create a dynamic array
> of const, is there another way that I am missing? Currently I am parsing the
> Fmt param.

Sure you can create one. Array of const is just an array of TVarRec. Just
create a dynamical array of TVarRec and pass that.

{$mode objfpc}
program tests;

uses sysutils;

Var
  A : Array of TVarRec;

begin
  SetLength(A,10);
  // Fill A;
  Format('Something',A);
end.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to