In a template, statements beginning with “- -” are comments and are not interpreted by the tool. Formatting instructions and other text written between the /@ and @/ markers are passed to the output files verbatim.
The example uses the following template:
TEMPLATE example;
-- Initiation (global) section
PARAMETER
STRING act_name; -- activity for which
-- the report is written
VARIABLE
ACTIVITY act_id; -- id of “act_name”
INTEGER st; -- status return code
BEGIN
act_id := stm_r_ac (act_name, st);
END;
SEGMENT seg1; -- contains chapter 1 of the document
BEGIN
/@
.page
@/
WRITE (’.center Description of ’,act_name);
/@
.chapter An Overview
@/
INCLUDE (’sys_overview’); -- an include file containing
-- text with formatting commands
END;SEGMENT seg2; -- contains chapter 2 of the document
VARIABLE
LIST OF ACTIVITY ac_list;
BEGIN
/@
.page
.chapter System Activities
.section Activity-chart
.skip
This is the chart that describes the activities
of the system:
@/
...........
stm_plt(act_id, ....); -- Activity-chart plot
............
/@
.page
.section Activities’ description
.skip
Detailed description of each activity in the chart:
@/
ac_list:=stm_r_ac_logical_sub_of_ac({act_id},st);
stm_rpt_dictionary(ac_list,....); -- property report
END;