[fpc-pascal] Problem with varargs directive
silvioprog at gmail.com
Mon Jan 11 19:56:18 CET 2016
On Mon, Jan 11, 2016 at 3:41 PM, Anthony Walter <sysrpl at gmail.com> wrote:
> I believe in Delphi only external functions may use varargs. In your case
> you are declaring a variable, which could be assigned to a local function.
You are right:
So it seems that I can't use `varargs` loading libraries dynamically on
function FmtStr(const fmt: PAnsiChar): PAnsiChar; varargs; cdecl; external
I need to use it in variables because I wanna load my library dynamically.
Note: varargs comes before cdecl, though I am not sure if it matters.
It seems irrelevant, but I saw it in some Delphi units declaring it as `...
cdecl; varargs; ...`.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal