Logo

Programming-Idioms

History of Idiom 190

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.

#Edit dateEdit SummaryAuthor
👁 Δ 12 2023-10-14, 18:30 [Ada] Forgot to put with to imports ~jv~
👁 Δ 11 2023-10-14, 18:30 New Ada implementation by user [~jv~] ~jv~
👁 Δ 10 2022-02-26, 20:59 New Python implementation by user [Oldboy] Oldboy
👁 Δ 9 2021-08-16, 06:00 [C] Secure Coding: Instead of hard coding the count, it should be calculated to avoid later mistakes with changed a[]! abdec
👁 Δ 8 2020-12-11, 05:26 New Go implementation by user [Arnie97] Arnie97
👁 Δ 7 2020-07-15, 17:16 New Rust implementation by user [Plecra] Plecra
👁 Δ 6 2019-10-07, 04:47 New Perl implementation by user [daxim] daxim
👁 Δ 5 2019-09-28, 15:33 New Pascal implementation by user [Bart] Bart
👁 Δ 4 2019-09-28, 12:25 New C implementation by user [phrank] phrank
👁 Δ 3 2019-09-27, 22:36 New Cpp implementation by user [chardan] chardan
👁 Δ 2 2019-09-27, 13:20 Additional requirement for only using standard features. tkoenig
1 2019-09-27, 12:57 Idiom creation by user [tkoenig] tkoenig