SML# Document Version 4.1.0
19 Expressions

19.22 Dynamic import expression: ⟨exp⟩ : _import ⟨cfunty⟩

Similarly to the static import expression, this imports a function pointer obtained by dynamic linking as an SML# function. The type of ⟨exp⟩ must be codeptr. When evaluating this expression, ⟨exp⟩ is evaluated to an function pointer. If the function pointer points to a C function of the type indicated by ⟨cfunty⟩, the value of this expression is the SML# function that calls the C function. Otherwise, the value of this expression is undefined.