var
  A: array of TVarRec;

Just beware - it is not as simple as it seems.  For one, you will need to
make sure strings referred to by TVarRec remains active until after the call
to Format.

----- Original Message -----
From: "Neven MacEwan" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 4:24 PM
Subject: [DUG]: format function


> Hi all
>
> I want to use the format function and pass it a dynamic array of values,
Can
> this be done
>
> S := 'Name is %s %s';
> Result := format(S,A)
>
> but how do I declare A?
>
> TIA
>
>  Regards Neven
>  N.K. MacEwan B.E. E&E
>  Ph 649 621 0001
>  Fax 649 621 0400
>  [EMAIL PROTECTED]
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to