[fpc-pascal] Pass array of record as parameter

Everton Vieira tonvieira at gmail.com
Thu Feb 9 18:52:22 CET 2012


Could you give an example? If not bother much.

Em 09/02/2012, às 15:45, Thomas Young escreveu:

> Define a pointer type for TInfo then pass the pointer to the function. Dereference the pointer within the function to access the array.
> 
> Thomas Young
> 330-256-7064
> www.tygraphics.net
> Sent from my iPhone
> 
> On Feb 9, 2012, at 12:17 PM, Zaher Dirkey <parmaja at gmail.com> wrote:
> 
>> Hi, 
>> 
>> TInfo=record 
>>  s: string;
>>  i: integer;
>> end;
>> 
>> function func1(a: array of TInfo);
>> 
>> how can i pass the parameter to that function?
>> 
>> for example, i cant do that?
>> 
>> func1([('test1', 1), ('test2', 2)]);
>> 
>> -- 
>> I am using last reversion of Lazarus, FPC 2.6
>> 
>> Thanks in advance
>> 
>> Zaher Dirkey
>> 
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal




More information about the fpc-pascal mailing list