HP Pascal/iX Reference Manual (31502-90022)

2-: 10
Separators
A
separator
is a space, a tab, an end-of-line marker, a compiler option,
or a comment. Separators are used to separate reserved words,
identifiers, numbers, strings, and special symbols. At least one
separator must appear between any pair of consecutive identifiers,
numbers, or reserved words. When one or both elements are special
symbols, however, the separator is optional.
Separators may not appear within special symbols having more than one
component (:=, for example). Certain special symbols have synonyms. In
particular, (. and .) may replace the left and right brackets, [ and ].
The symbol @ may substitute for the up-arrow ^, also (* and *) may take
the place of the left and right braces, { and }.
Example
IF EOF THEN GOTO 99 { Required separators. }
x := x + 1 { Optional separators. }
x:=x+1 { No separators. }
String Literals
String literals
are sequences of characters, enclosed by single quote
marks, that may not be longer than a single line of source code. String
literals may consist of any combination of the following:
* A sequence of ASCII characters enclosed in single quote marks.
* A sharp symbol (#) followed by a single character.
* A sharp symbol (#) followed by up to three digits that represent
the ASCII value of a character.
A letter or symbol after a sharp symbol is equivalent to a control
character. For example, #G or #g encodes CTRL-G, the bell character.
The compiler interprets the letter or symbol according to the expression
chr(ord(letter) MOD 32). Therefore, the ordinal value of G is 71;
modulus 32 of 71 is 7; and the ASCII value of 7 is the bell.
In a string literal, if a number is used after a sharp symbol, it may
contain up to three digits, but must be in the range 0 through 255. It
directly encodes any printing or nonprinting ASCII character. For
example, the string literal #80#65#83#67#65# 76 is equivalent to the
string literal PASCAL.
Any ASCII character can appear between quote marks. The sharp symbol #
is provided to enable better documentation of nonprinting characters.
A string literal may be type char, PAC, or string. This is dependent on
the context in which it is used. If a single quote is a character in a
string literal, it must appear twice, consecutively.
Two consecutive quote marks ('') are used to specify the null or empty
string literal. Assigning this value to a string variable sets the
length of the variable to zero. Assigning this value to a PAC variable
blank-fills the variable.
Syntax
String_literal: