HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4- 138
* Files are closed (except those declared in COMMON).
* Data pointers are lost.
* ON END, ON ERROR, ON DBERROR, ON GOTO, and ON GOSUB statements are
deactivated.
STOP REPORT
The STOP REPORT statement is a Report Writer statement that can be used
to terminate a report prematurely. This statement can also be used when
the user does not know if a report is active as no error is generated by
this statement.
The STOP REPORT statement is implicitly used when a report ends
abnormally for other circumstances, such as a STOP statement or END
statement. Note that this statement can occur anywhere in the report
subunit.
Syntax
STOP REPORT
Examples
100 STOP REPORT !Terminates a report
The STOP REPORT statement does not start report output if it has not
already begun.
This statement performs different actions for active reports, depending
on its usage. As a program statement, the STOP REPORT statement looks
for a REPORT EXIT section in the report description. If present, the
REPORT EXIT condition is evaluated. This section is then executed if the
expression is true (nonzero). It is not executed if the condition is
false or if the REPORT EXIT section does not exist.
As a command, or when called implicitly, for example, during a STOP, STOP
REPORT does not look for a REPORT EXIT statement. The report is simply
terminated.
If report output has started, the STOP REPORT statement always prints a
page eject as its last action. This is done to guarantee that HP
Business BASIC/XL does not print any system output on the report. Thus,
a TRIGGER PAGE BREAK is not needed in the REPORT EXIT section.
STOP REPORT automatically ends all GOSUBS that were executed by the
report; for example, all GOSUBS done after the last executable Report
Writer statement are prematurely ended. Execution resumes at the line
following STOP REPORT. This includes ON ERROR GOSUB, ON HALT GOSUB and so
on.
In all cases, STOP REPORT deactivates a report. No errors can prevent
this from happening.
SUB
The SUB statement defines the beginning of a subprogram. It is not
executable.
Syntax
{SUBPROGRAM}
{SUB }
sub_name
[(
f_param
[,
f_param
]...)]
Parameters
sub_name
Subprogram name. This is an identifier.