Call a foreign-language function: Difference between revisions

Line 887:
 
=={{header|Julia}}==
{{works with|Julia|0.6}}
 
Julia has a built-in keyword <code>ccall</code> to call external C-like functions. For example:
<lang julia>p = ccall(:strdup, Ptr{Cuchar}, (Ptr{Cuchar},), "Hello world")
@show unsafe_string(p) # "Hello world"
ccall(:free, Void, (Ptr{Cuchar},), p)</lang>
</lang>
 
=={{header|Kotlin}}==
Anonymous user