[fpc-pascal] Pass array of record as parameter

Thomas Young tygraphics at me.com
Thu Feb 9 19:04:47 CET 2012


New(A);

>> function func1(a:ATInfoPtr);
      var
         Name:string;
         N:integer;
      begin
         N:= 1;
         Name:= a^[n].s;
      end;

    

Thomas Young
330-256-7064
www.tygraphics.net
Sent from my iPhone

On Feb 9, 2012, at 12:53 PM, Thomas Young <tygraphics at me.com> wrote:

> This is how I would do that. There may be a better way.
> 
>> TInfo=record 
>>  s: string;
>>  i: integer;
>> end;
>> 
> ATInfo = array[1..100] of TInfo;
> ATInfoPtr = ^ATInfo;
> 
> Var
> A:ATInfoPtr;
> 
>> function func1(a:ATInfoPtr);
> 
> Thomas Young
> 330-256-7064
> www.tygraphics.net
> Sent from my iPhone
> 
> On Feb 9, 2012, at 12:24 PM, Everton Vieira <tonvieira at gmail.com> wrote:
> 
>>> TInfo=record 
>>>  s: string;
>>>  i: integer;
>>> end;
>>> 
>>> function func1(a: array of TInfo);
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120209/064441ae/attachment.html>


More information about the fpc-pascal mailing list