VMS Help
PASCAL, Miscellaneous
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The %TITLE and %SUBTITLE directives allow you to specify a
compile-time string expression for the listing title and
subtitle lines.
Syntax:
%TITLE 'character string'
or
%SUBTITLE 'character string'
The compiler listing header includes the %TITLE and %SUBTITLE
strings in the title and subtitle sections. If you do not
specify these directives, Compaq Pascal fills the %TITLE field
with blanks and the first %SUBTITLE field with 'source listing'.
If a specified 'character string' is too long to fit in the
predefined title and subtitle sections, the string will be
truncated on the right without warning.
If a %TITLE directive appears on the first line of a page, it
sets the title area for the current page and any following pages
until the compiler encounters another %TITLE directive. If the
%TITLE directive does not appear on the first line of a page,
then the title area is not set until the next page.
The %SUBTITLE directive affects only the subtitle area in the
source listing section. If a %SUBTITLE directive appears on the
first or second line of a page, then the subtitle area is set
for the current page. If the %SUBTITLE directive does not
appear in the first two lines of a page, then the subtitle area
is not set until the next page.
If either of these directives is used and if a listing is being
generated, Compaq Pascal generates a table of contents page by
default. This page appears first in the listing, preceding the
source listing section. To disable the table of contents
option, you must use a compilation switch.
The %INCLUDE directive inserts the contents of a file at the
location of the directive in the code and has the following
form:
Syntax:
%INCLUDE 'file-spec [[/[[NO]]LIST]]'
The 'file-spec' is the name of the file to be included.
The /LIST qualifier indicates that the included file should be
printed in the listing of the program if a listing is being
generated. If not specified, the default is determined by the
use of compilation switches. Use of this parameter overrides
compilation switches.
See the "Compaq Pascal Language Reference Manual" for the
complete description of using the %INCLUDE directive.
The %DICTIONARY directive allows access to data definitions
stored in the CDD/Repository, which is a product that must be
purchased separately and may not be available on your
environment.
Syntax:
%DICTIONARY 'cdd-path-name [[/[[NO]]LIST]]'
The 'cdd-path-name' is a character string that represents the
full or relative path name of a CDD record description to be
extracted. The resulting path name must conform to the rules
for forming CDD path names.
A full path name is one that begins with CDD$TOP and specifies
the names of all its descendants; it is a complete path to the
record definition. Descendant names are separated from each
other by a period.
A relative path name begins with any generation other than
CDD$TOP, and specifies the names of the descendants after that
point. You can create a relative path by establishing a default
directory with a logical name.
The /LIST qualifier indicates that the included declarations
should be printed in the listing of the program if a listing is
being generated. If not specified, the default is determined by
compilation switches. Use of this parameter overrides
compilation switches.
Example:
TYPE
%DICTIONARY 'CDD$TOP.CORPORATE.SALARY_RANGE'
The definition of 'CDD$TOP.CORPORATE.SALARY_RANGE' is placed in
a program at the position of the TYPE declaration.
/LIST
The /LIST qualifier is an option that indicates that the
included information be printed in the listing of the
program if a listing is being generated. This is the
default.
/NOLIST
The /NOLIST qualifier is an option that indicates that the
included information not be printed in the listing of the
program. The line containing the directive (%INCLUDE or
%DICTIONARY) does appear in the program listing if one is
generated.
Comments document the actions or elements of a program. The
text of a comment can contain any ASCII character except a
nonprinting control character, such as an ESCAPE character. You
can place comments anywhere in a program that white space can
appear.
You signify a comment with braces or with a parenthesis and
asterisk pair, as follows:
Example:
{ This is a comment }
(* This is also a comment *)
Compaq Pascal allows you to mix the two symbol pairs in one
comment, as follows:
{ The delimiters of this comment do not match. *)
(* Compaq Pascal allows you to mix delimiters in this way. }
Compaq Pascal does not allow you to nest comments. The
following example causes a compile-time error because the
comment ends at the first closing delimiter (}).
Example
The following is illegal:
(* Comments can not be nested { in Compaq Pascal } within
a program *)
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.