To output the portion of a long description appearing between the strings
"!BEGIN"
and"!END"
for stateS1
, use the following code:stm_id state_id;
stm_filename descr_file;
.
.
.
state_id = stm_r_st ("S1", &status);
descr_file = stm_r_st_keyword (state_id,
"!BEGIN", "!END", "", &status);
.
.
.The fourth input parameter (empty string) of the function
stm_r_st_keyword
determines the file name to which the extracted text is written. If the string is empty, as it is in this case, the function creates a temporary file. The name of this file is returned by the function (in this case, the assignment statement stores the returned file name indescr_file
).