pe_factory_unit

Creates the specified unit object.

Usage syntax

PE_UNIT pe_factory_unit (int code);

Parameters
code The code of the predefined unit object
Description

Creates the predefined unit object with the specified code.

Returns

On success, the new unit object. On failure, a null pointer.

Examples

PE_UNIT meter = pe_factory_unit(PE_U_METER);