Overview
C API (Component Interface)
typedef UINTA Symbol;

Symbols are used as "handles" to (i.e., to represent) all objects maintained by the framework, as well as to represent some constant (global) objects. This includes, for example, representing global return codes, instance errors (distinct objects that have further information associated with them), numbers (as in 1, 2, 3...), XML nodes, SystemML objects, and Components. Therefore, most functions in the Component Interface return a Symbol, which may either be a return code or some object. The type has the same width as the architecture's native bit-width (UINTA).

Some constant symbols are defined in the Component Interface (listed below). Symbols representing constants (including non-error return codes) have the form C_XXX. Symbols representing errors have the form E_XXX. These will generally be defined in the documentation for interface functions that return them. C_OK is the generic code meaning "operation completed successfully", and will (hopefully) be encountered often.

Constants

Some pre-defined symbol constants (others are listed elsewhere in the documentation).

S_NULL
No object, no reponse, sought item not found, etc.
C_OK
Operation completed successfully.
C_YES
Yes.
C_NO
No.
EVENT_USER_MIN
User event constants should be set equal to this value plus a small integer.

Macros

You can test a Symbol to discover what type it is using these macros defined in the Component Interface.

S_NUMBER(symbol)
Returns true if symbol is a number.
S_CONSTANT(symbol)
Returns true if symbol is a constant.
S_ERROR(symbol)
Returns the base error code (i.e. zeroes the bits reserved by the framework) if symbol is an error, or S_NULL if it is not an error.

This leads to the oft-encountered idiom if(S_ERROR(result)) throw result;.