Utility Functions : List of Utility Functions : stm_str_list_length

stm_str_list_length

Function type: INTEGER

Description
Returns the number of items in the specified list of strings.
Syntax
stm_str_list_length (list, status)
Arguments
 

 

Status Codes
Example
Assume you have extracted all the static reactions in state ST1 from the database. Before writing the list of strings to your document, you want to make sure that it will not span more than 30 lines of text (one page length). Your template should contain the following statements:

VARIABLE
STATE st;
STRING str;
LIST OF STRING str_list;
INTEGER str_list_len, status;
CONSTANT INTEGER page_len := 30;
.
.
st:=stm_r_st (’ST1’,status);
str_list:=stm_r_st_static_reactions (st, status);

str_list_len := stm_str_list_length (st, status);
IF str_list_len < page_len
WRITE (’\n List of Reactions: ’);
FOR str IN str_list LOOP
WRITE (’\n’, str);
END LOOP;
END IF