
5 The MLWorks Motif Interface Library
Where a C function "returns" information by assigning values to a pointer argument, the corresponding ML function returns the information as the result value.
Although the result of a C function indicates success or failure, the corresponding ML function does not. Instead, it indicates failure by raising an exception. Functions with return type unit do not return a useful value.
Where a C function takes a variable number of arguments, the corresponding ML function takes a list. Where one of a set of predefined options needs to be passed to a function, these options are implemented as datatypes. Resources are also implemented as datatypes.
If a C function takes a disjunction of flags combined in a single word, the corresponding ML function takes a list of values. The possible values are specified by a datatype.

Generated with Harlequin WebMaker