Document Templates : Data-types and Expressions : Data-types : LIST OF simple_type

LIST OF simple_type

Identifiers declared as LIST OF simple-type can be assigned values of a list of items of any data-type. Simple-type may be any of the above types (e.g. LIST OF STRING, LIST OF ACTIVITY, etc.).

The following example shows a typical use of identifiers of this type; in this case, we have declared an identifier of type LIST OF STATE.

VARIABLE
LIST OF STATE sub_st;
STATE st_id;
INTEGER st;
BEGIN
st_id := stm_r_st (‘S1’ , st) ;
sub_st := stm_r_st_logical_sub_of_st({st_id},st) ;

END;

In this example, the variable st_id is assigned the ID of the state S1.

This variable is then used with another database extraction function to extract all of the substates of st_id and assign their values to the variable sub_st of type LIST OF STATE.