[fpc-pascal] Problem with varargs directive

Anthony Walter sysrpl at gmail.com
Mon Jan 11 19:41:49 CET 2016


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.

function FmtStr(const fmt: PAnsiChar): PAnsiChar; varargs; cdecl; external
yourlibname;

Note: varargs comes before cdecl, though I am not sure if it matters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160111/a296b82e/attachment.html>


More information about the fpc-pascal mailing list