Call a function in a shared library: Difference between revisions
Call a function in a shared library (view source)
Revision as of 21:18, 7 October 2021
, 2 years ago→{{header|Fortran}}
(Added SNOBOL4 example.) |
|||
Line 372:
end;
end;</lang>
=={{header|Forth}}==
===GNU Forth 0.7.9 on Linux===
Call tgamma() from limbm.so
<lang Forth>
c-library math
s" m" add-lib
\c #include <math.h>
c-function gamma tgamma r -- r
end-c-library
</lang>
{{Out}}
<pre>
require ./foreign.fs ok
1.01e2 gamma fs. 9.33262154439442E157 ok
</pre>
=={{header|Fortran}}==
|