Download HP BASIC for OpenVMS User Manual

Transcript
If the %TITLE directive is the first source text in a module, then the quoted
string appears in the first line of every page of the compilation listing;
otherwise, the quoted string appears in the first line of every subsequent
page in the compilation listing. That is, if BASIC encounters a %TITLE
directive after it has begun creating a page in the output listing, the title
information will not appear on that page. Rather, it appears on all of the
following pages until it encounters another %TITLE directive.
%TITLE must appear on its own line. For example:
%TITLE "File OPEN Subprogram -- Author Hugh Ristics"
SUB FILSUB (STRING F_NAME)
The %SBTTL directive lets you specify a line of text that appears on the second
line of every page in the compilation listing (beneath the title). If BASIC
encounters a %SBTTL directive after it has begun creating a page in the
output listing, the subtitle information will not appear on that page. Rather, it
appears on all following pages until it encounters another %SBTTL or %TITLE
directive. If you want the subtitle to appear on the first page, the %SBTTL
directive must appear directly after the %TITLE directive.
Any number of %SBTTL directives can appear in a source file; thus, you can
use subtitle text to identify parts of the source program. As in %TITLE, the
text you use in %SBTTL must be a quoted string not exceeding 31 characters.
Note, however, that subtitle information appears on listing pages that contain
the actual source code.
The following example shows the use of both %TITLE and %SBTTL directives.
The first line of the listing’s first page contains ‘‘Payroll Program’’ and the
second line contains ‘‘Constant Declarations.’’ When BASIC encounters
the %SBTTL directive, the second line on each subsequent page becomes
‘‘Subroutines.’’ When BASIC encounters the %SBTTL directive, the second line
on each subsequent page becomes ‘‘Error Handler.’’
%TITLE
%SBTTL
.
.
.
%SBTTL
.
.
.
%SBTTL
.
.
.
"Payroll Program"
"Constant Declarations"
"Subroutines"
"Error Handler"
Compiler Directives 16–3