Logo

Programming-Idioms

History of Idiom 190 > diff from v4 to v5

Edit summary for version 5 by Bart:
New Pascal implementation by user [Bart]

Version 4

2019-09-28, 12:25:15

Version 5

2019-09-28, 15:33:45

Idiom #190 Call an external C function

Declare an external C function with the prototype

void foo(double *a, int n);

and call it, passing an array (or a list) of size 10 to a and 10 to n.

Use only standard features of your language.

Idiom #190 Call an external C function

Declare an external C function with the prototype

void foo(double *a, int n);

and call it, passing an array (or a list) of size 10 to a and 10 to n.

Use only standard features of your language.

Extra Keywords
C interoperability
Extra Keywords
C interoperability
Code
procedure foo(a: pdouble; n: integer); external 'some_c_dll' name 'foo'; cdecl;