Use continuation rules cautiously when modal commands appear in the input stream. The
following examples show common continuation errors:
• IF LASTCC = 0 -
THEN
LISTCAT
- A continuation mark (hyphen) is missing after the THEN keyword.
A null command is assumed after the THEN keyword, and the LISTCAT
command is unconditionally run.
• IF LASTCC = 0 -
THEN -
REPRO ...
/*ALTERNATE PATH*/
ELSE -
PRINT ...
- Because no continuation mark (hyphen) follows the comment, the
program assumes a null command. The ELSE keyword will not match the
THEN keyword. Note the correct use of the continuation marks on the
other records.
• IF LASTCC = 0 -
THEN -
REPRO ...
ELSE -
PRINT ...
- Because a blank line with no continuation mark (hyphen) follows
the ELSE keyword, the ELSE becomes null and the PRINT command is unconditionally
run.
• PARM TEST ( - /*COMMENT*/
TRACE)
- The
program does not continue the PARM command onto the second record,
because characters other than blanks appear between the continuation
mark (hyphen) and the end of the record.
• PARM TEST ( TRA+
/*FIELD CONTINUATION*/
CE)
- The processor finds the end of the PARM command after the second
record, because no continuation was indicated. The processor rejects
command.