[fpc-pascal] Problem with varargs directive

silvioprog silvioprog at gmail.com
Mon Jan 11 19:33:42 CET 2016


Hello,

The problem seems more related to Delphi, but I want to understand why it
compiles only in FPC.

The declaration is just:

=== begin code ===
var
  FmtStr: function(const fmt: PAnsiChar): PAnsiChar; cdecl; varargs;
=== end code ===

And the full console project to test it in attachment.

It compiles only in FPC, in Delphi I got:

E2029 ',' or ':' expected but ';' found

Why? I don't know if it's a bug in Delphi or a breach in FPC.

ps. it compiles fine in FPC even using `$mode delphi`.

-- 
Silvio Cl├ęcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160111/0ec221f8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vrs.zip
Type: application/zip
Size: 7698 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160111/0ec221f8/attachment.zip>


More information about the fpc-pascal mailing list