6 The MLWorks Windows Interface Library

6.2 Type conventions

Differences between the ML and C type systems mean that we have had to adopt certain translation conventions in our implementation. This section describes those conventions.

Where a C function "returns" information by assigning values to a pointer argument, the corresponding ML function returns the information as the result value.

Where the result of a C function indicates success or failure, the corresponding ML function does not. Instead, the ML function 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. Lists are also used to pass flags, where the corresponding C function combines the flags with the logical OR function.

Values defined by #define, such as messages, are represented by ML datatypes.

Where an ML function differs from a C function, in terms of parameters and return values, is marked accordingly.


MLWorks Reference Manual (version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker