Reference Guide > Special Characters
  

Special Characters
This section describes characters with special interpretation and their function in PV‑WAVE.
 
note
Special characters cannot be used with the executive commands (.RUN, @, and so forth).
ampersand (&)—The ampersand separates multiple statements on one line. Statements may be combined until the maximum line length of 511 characters is reached. For example, the following line contains two statements:
I = 1 & PRINT, 'VALUE: ', I
apostrophe (')—Delimits string literals and indicates part of an octal or hexadecimal constant.
asterisk (*)—In addition to denoting multiplication, designates an ending subscript range equal to the size of the dimension. For example, 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 end of a line indicates that the current statement is continued on the following line. The dollar sign character may appear anywhere a space is legal except within a string constant (where it is interpreted literally). Any number of continuation lines are allowed.
exclamation point (!)—Begins the names of system-defined variables. System variables are predefined variables of a fixed type. Their purpose is to override defaults for system procedures, to return status information, and to control the action of PV‑WAVE.
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 (")—The quotation mark precedes octal numbers which are always integers and delimits string constants. Examples: "100B is a byte constant equal to 6410, "Don't drink the water." is a string constant.
semicolon (;)—Begins a comment field of a statement. All text on a line following a semicolon is ignored by PV‑WAVE. A line may consist of just a comment or may contain both a valid statement followed by a comment.
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.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.