HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

4- 62
num_lines
The maximum number of lines expected to be needed by the
section statement. This number reflects ALL output done
by the section.
image
An IMAGE string or a line reference to an IMAGE line.
output-list
A list of output items. This list is identical to the
list used by PRINT USING.
Examples
100 HEADER 1 WITH 3 LINES
100 HEADER Order(1) USING Hd_image;Who
The HEADER statement generates an error if there is not an active report.
If a report section is active (executing) and encounters this statement,
then that report section ends.
When BEGIN REPORT executes, the
level
_
number
of each HEADER statement is
evaluated. HEADER sections with level numbers equal to zero are ignored.
All of the level numbers are fixed by BEGIN REPORT and the HEADER
statements become busy. All nonzero HEADER levels must be distinct and
within the range of one to nine. The levels do not have to be
contiguous. A HEADER statement can define a section without a
corresponding TRAILER section and vice versa.
HEADER statements and sections execute when an automatic break occurs
from BREAK IF or BREAK WHEN, or when the TRIGGER BREAK statement
executes. HEADER sections are printed in ascending sequence by level
number. See the DETAIL LINE statement for more details about automatic
breaks.
The HEADER sections automatically execute when report output starts. The
headers follow the printing of the report header and page header,
printing in ascending order.
A particular HEADER section executes the HEADER statement first. This
causes evaluation of the WITH clause first (which can cause a page break)
followed by the execution of the USING clause. Additional statements in
the HEADER section execute after the HEADER statement.
IF THEN or IF THEN ELSE
The IF THEN or IF THEN ELSE statement executes a "then clause" if the
evaluated numeric expression is TRUE (nonzero). If the evaluated numeric
expression is FALSE (zero), the IF THEN statement transfers control to
the statement immediately following it, and the IF THEN ELSE statement
executes an "else clause." Each clause is either an executable statement
or a line identifier. If it is a line identifier, then execution
transfers control to that line. The syntax of this statement requires
that the entire statement be contained on one line. The statement can
also be used as a command.
Syntax
IF
num_expr
THEN
then_clause
[ELSE
else_clause
]
Parameters
num_expr
A numeric expression considered TRUE if it evaluates to
nonzero and FALSE if it evaluates to zero.
then_clause
Executable program statement or
line_id
. If
num_expr
is
TRUE (nonzero), the IF THEN statement executes the
executable program statement or transfers control to
line_id
.
line_id
is the line number or line label to
which control transfers.