NET/MASTER Network Control Language (NCL) Reference Manual
Statement Analysis
Compiler Operation
106126 Tandem Computers Incorporated 8–11
The compiler ignores the null statement (a semicolon by itself). You can use the
NOP statement as an explicit do-nothing statement.
Certain statements allow or assume a semicolon before and/or after certain
keywords. For example, the IF core statement assumes a semicolon before and
after its keywords THEN and ELSE. This means that these statements can cross
lines at certain points without needing a comma to indicate statement
continuation.
You must use a semicolon when you want to place more than one statement on a
single source line. The semicolon then separates the individual statements as in the
following example:
say hello; say how are you; say goodbye
Determining Statement
Type
When NCL begins to process the lexical element(s) in a new statement, it treats any
symbol, or a quoted string (excluding hexadecimal and binary strings) followed by a
colon (:), as a label.
After processing the label, NCL uses the lexical element that follows to determine the
statement type. It checks to see if the lexical element is a recognized statement. There
are two types of statements: core statements and verb statements (normally called
“verbs”).
An unrecognized statement is treated as an error. The following rules apply to
unrecognized statements:
During compilation, the statement causes a compilation error. You can use the
compiler directive %%OPTIONS DEFER to flag the statement as unrecognized and
to force the compilation to continue.
During execution, the statement causes a run-time error. You can trap (or
intercept) the error with an error handler in your NCL procedure. For more
information on error handlers, see the ON core statement in Section 2, “Core
Statements.” For examples of how to trap run-time errors, refer to the NonStop
NET/MASTER NCL Programmer’s Guide.