The following example shows how to include a portion of the long description of the state
S1
in a document. The section extracted is the text appearing between the strings’!BEGIN’
and’!END’
.VARIABLE
STATE state_id;
STRING descr_file;
.
.
state_id := stm_r_st (’S1’, status);
descr_file := stm_r_st_keyword (state_id, ’!BEGIN’,
’!END’,’’,status);
INCLUDE (descr_file);
.
.
.The fourth input parameter (the empty string) of the function
stm_r_st_keyword
determines the name of the file to which the extracted text is written. If the string is empty, as in this case, the Documentor creates a temporary file where it stores the text. The name of this temporary file is returned by the function. Using theINCLUDE
statement, you write the text to the generated document.