Sign in Join
Wiki copytemporary

Revision 1 of 1, by Trev on 2-12-2020. The page as it is now.

Cppdecl

Back to Reserved words.

The cppdecl modifier belongs to the calling conventions for internal and external subroutines.

The cppdecl modifier is used to call a function according to the C++ calling convention.

Example 1:

pascal
function subTest : string; [cppdecl];
  begin
    subTest := 'abc';
  end;

Example 2:

pascal
  ...
  function funcTest(strTestdaten : Pchar) : LongWord;  cppdecl;  external 'Test.dll';
  ...

From the Free Pascal wiki, page "Cppdecl", as it stood on 2020-02-12 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.