Model Templates : Template for nroff : Template with nroff Commands

Template with nroff Commands

TEMPLATE example;

-- Initiation Section
PARAMETER
STRING act_name := ’SC_ACTIVITIES’; -- the activity
-- for which the report is written.
STRING plot_dev:= ’HP7475’;

VARIABLE
ACTIVITY act_id; -- id of ’act_name’.
INTEGER st; -- return status code.
STRING title; -- title of plot.
FLOAT acty; -- actual height of plot.

BEGIN
act_id := stm_r_ac(act_name, st);
END;

SEGMENT seg1;
BEGIN
INCLUDE(’nroff_glob’);
WRITE(’\n.bp’);
WRITE(’\n.ce\nDescription of ’, act_name);
WRITE(’\n.sp\n.sh 1 Overview’);
INCLUDE(’sys_overview’); -- ’sys_overview’ is an
-- include file in which
-- text with formatting
-- command is written.
END;

SEGMENT seg2;
VARIABLE
LIST OF ACTIVITY ac_list;

BEGIN
/@.bp
.sh 1 ”SYSTEM ACTIVITIES”
.sp
.sh 2 ”Activity-chart”
.sp
This is the chart that describes the activities
of the system:
.br
@/


-- leave 40 lines in one page to the plot
WRITE(’\n.sp 40\n’);
title:= ’Plot of ’ + act_name;
-- plot of activity-chart
stm_plt(act_id,’act_plot’,6.5,9.0,’F’,’F’,
true,999,plot_dev,stm_plt_top,title,acty);
-- second section
/@
.bp
.sh 2 ”Activities Description”
.sp
Detailed description of each activity in chart:
@/

ac_list := stm_r_ac_physical_sub_of_ac({act_id},st);
-- Property Report
stm_rpt_dictionary(ac_list,true,true,’ ’);
END;