Special Characters
This section describes characters with special interpretation and their function in PV‑WAVE.
ampersand (&)—
I = 1 & PRINT, 'VALUE: ', I
apostrophe (')—Delimits string literals and indicates part of an octal or hexadecimal constant.
asterisk (*)—A(3:*)
represents all elements of the vector A
except the first three elements.
“at” sign (@)—When the “at” sign is the very first character in a PV‑WAVE command line, it causes the compiler to substitute the contents of the command file whose name appears after @. In addition to searching the current directory for the file, PV‑WAVE searches a list of locations where procedures are kept.
colon (:)—Ends label identifiers. Labels may only be referenced by GOTO
and ON_ERROR
statements. The following line contains a statement with the label LOOP1
:
LOOP1: x = 2.5
In addition, the colon is used in CASE statements.
The colon also separates the starting and ending subscripts in subscript range specifiers. For example A(3:6)
designates the fourth, fifth, sixth, and seventh elements of the variable A
.
dollar sign ($)—At the
exclamation point (!)—
period or decimal point (.)—Indicates in a numeric constant that the number is of floating-point or double-precision type. Example: 1.0
is a floating-point number.
Also, in response to the WAVE>
prompt, the period, if it is the first character on the line, begins an executive command. For example:
WAVE> .RUN myfile
causes PV‑WAVE to compile the file myfile.pro
. If myfile.pro
contains a main program, the program will also be executed.
However, if the period is not the first character on the line as in the following example,
WAVE> .RUN myfile
you receive a syntax error.
Also, the period precedes the name of a tag when referring to a field within a structure. For example, a reference to a tag called NAME
in a structure stored in the variable A
is: A.NAME
.
quotation mark (")—"100B
is a byte constant equal to 6410, "Don't drink the water."
is a string constant.
semicolon (;)—
When the $ character is entered as the first character after the PV‑WAVE prompt, the rest of the line is sent to the operating system as a command. To send an operating system command from within a procedure, use the SPAWN command.