Anonymous user
Call a foreign-language function: Difference between revisions
Call a foreign-language function (view source)
Revision as of 13:17, 13 February 2012
, 12 years ago→{{header|Mathematica}}
(Add LabVIEW) |
|||
Line 400:
`free(@p)`;
);</lang>
=={{header|Mathematica}}==
This works on windows and on linux/mac (through Mono)
<lang Mathematica>Needs["NETLink`"];
externalstrdup=DefineDLLFunction["_strdup","msvcrt.dll","string",{"string"}];
Print["Duplicate: ",externalstrdup["Hello world!"]]</lang>
output
<pre>Duplicate: Hello world!</pre>
=={{header|Modula-2}}==
|