[fpc-pascal] Parameters to Format()
dhkblaszyk at zeelandnet.nl
dhkblaszyk at zeelandnet.nl
Fri May 25 11:57:53 CEST 2012
You should do:
type
MyVarArray = array of variant;
and then
procedure TUnyokedFrontendForm.OutputWriteF(const str: widestring;
values: MyVarArray; fg: TColor= clBlack; bg: TColor= clDefault);
Darius
On 25 mei '12, Mark Morgan Lloyd wrote:
> How should I put
this?
>
> procedure TUnyokedFrontendForm.OutputWriteF(const str:
widestring;
> values: array of variant; fg: TColor= clBlack; bg:
TColor= clDefault);
>
> var scratch: widestring;
>
> begin
> scratch
:= Format(str, values);
>
> As above, I get
>
>
unyokedfrontendcode.pas(354,32) Error: Incompatible type for arg no. 2:
> Got "Open Array Of Variant", expected "Array Of Const"
>
> I was
caught by this one years ago, and at the time the Delphi
> developers I
was in contact with had no easy solution.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120525/a85bd24c/attachment.html>
More information about the fpc-pascal
mailing list