Call a function in a shared library: Difference between revisions

(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}}==
357

edits