Function type:
STRING
Note that “previous” refers to the item physically located before the current item in the list of strings. The “current” item is determined using the utility functionstm_str_list_last_element
.
Assume you have a list of stringsS1, S2, S3,
andS4
assigned to the variablestr_list
. You locate the stringS4
by callingstm_str_list_last_element
.S4
becomes the current item. Your template should contain the following statements:VARIABLE
LIST OF STRING str_list;
STRING str;
INTEGER status;
.
.
str := stm_str_list_last_element (str_list, status);
WRITE (’\n The last string in the list is: ’, str);
str := stm_str_list_previous_element (str_list, status);
WRITE (’\n The third string in the list is: ’, str);
.
.