Documentor Functions : Calling Conventions : Function Return Values : Return Values of Enumerated Types

Return Values of Enumerated Types

DGL does not directly support enumerated data types. Functions that return discrete numerical values are considered to be of type INTEGER. The Documentor enables you to reference these numerical values by name. In reality, these names are internally defined as predefined constants in DGL. These names contain the prefix stm_.

For example, the function stm_r_st_type extracts the type of state specified in the function call. The possible state types are stm_st_and, stm_st_or, stm_st_diagram, and stm_st_component. These correspond to the values 0, 1, 2, 3 (respectively).

You can use the value names in your template. For example:

IF stm_r_st_type (st_id, status) = stm_st_component
THEN
...

The possible values that functions return, and their names, are documented in the function reference sections.