Re: [fpc-pascal] Problem with varargs directive

2016-01-11 Thread silvioprog
On Mon, Jan 11, 2016 at 4:18 PM, silvioprog wrote: > [...] > So I'm going to use it too hehe! :-) > Worked: http://pastebin.com/DjSkq7U8. :-) -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi

Re: [fpc-pascal] Problem with varargs directive

2016-01-11 Thread silvioprog
On Mon, Jan 11, 2016 at 3:56 PM, silvioprog wrote: > On Mon, Jan 11, 2016 at 3:41 PM, Anthony Walter 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: > [...]

Re: [fpc-pascal] Problem with varargs directive

2016-01-11 Thread silvioprog
On Mon, Jan 11, 2016 at 3:41 PM, Anthony Walter 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: http://docwiki.embarcadero.com/RADStudio/XE8/en/E2591_Only_cdecl_funct

Re: [fpc-pascal] Problem with varargs directive

2016-01-11 Thread Anthony Walter
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