SeeView Manual
SeeView Language Elements
HP NonStop SeeView Manual—526355-004
5-2
Program Structure
Program Structure 
SeeView programs consist of sections, procedures, and menus. These program 
elements have the following functions: 
•
A section declares a group of statements to be executed immediately. 
•
A procedure declares statements to be executed with a CALL statement. 
•
A menu declares text that is to be stored in a named memory cache. 
You can organize SeeView statements into small groups, such as those interactively 
entered from a window sill, or into very large groups, such as thousands of statements 
in an EDIT file defining hundreds of procedures. The terms script and shell, rather than 
program, are often used for these two extremes when referring to what are essentially 
SeeView programs of different sizes. 
For a script or shell to do anything other than declare procedures or menu data, it must 
have at least one section containing SeeView statements. A SECTION is a group of 
SeeView statements to be executed. (For information on the SECTION directive, see 
Section 8, SeeView Directives.)
Example 5-1 shows a simple SeeView program. In the examples in this section, 
capitalized words represent keywords known to the SeeView program.
A keyword prefixed by a question mark in the first character position of a line is called 
an interpreter directive. An interpreter directive provides structural information to the 
SeeView program about the text following the directive. ?SECTION, ?PROCEDURE 
and ?MENU
 are interpreter directives. (See Section 8, SeeView Directives.)
When a SeeView script contains no interpreter, the contents of the script are assumed 
to constitute a section. This example is equivalent to the program in Example 5-1
:
TASK pup;
PAGE 2;
WINDOW pup,"listdev disc";
Sections
Sections declare logical groups of SeeView statements that are executed immediately 
when a SeeView source file is invoked. 
?SECTION section-name indicates the beginning of a section in a SeeView source 
file. Most SeeView programs have only one section. 
Example 5-1. A Simple SeeView Program
?SECTION main {All programs have a section
{------------} {Left braces indicate end of line comments
TASK pup; {Declare $SYSTEM.SYSTEM.PUP as a TASK
PAGE 2; {On terminal page number 2 
WINDOW pup, "listdev disc"; {Display window on PUP LISTDEV DISC output










