Model Templates : Template for nroff : Initiation Section (nroff)

Initiation Section (nroff)

In the initiation section of the templates, the string parameter act_name represents the name of the activity for which the report is generated. The value of act_name can be assigned at the time of template execution. Because you can also assign an initial value to the parameter, assume that act_name was assigned an initial value of SC_ACTIVITIES.

A second parameter, plot_dev, represents the plotter output device on which you want to produce the plot. This output device need not be identical to the one used to print the document. For example, you might want to produce the plot and text separately, merging them together later. This parameter is assigned an initial value, which you can change in a special form at the time of template execution.

Next, the template declares four variables:

act_id - The ID of the activity for which the report is generated. This variable is declared of type ACTIVITY.
st - A return status code for the database extraction functions. It is declared as an INTEGER.
title - The string used to pass the title to the plot tool.
acty - A float that is an output parameter from the plot tool, which specifies the actual height of the plot.

Lastly, in the body of the initiation section, there is one statement, an assignment for the variable act_id. To make the assignment, the template uses a database extraction function that takes act_name as a parameter and returns the corresponding ID.