CHECK

Turns on all run-time checks in generated code.
Note: This directive is supported for native COBOL only.

Syntax:

>>--.----.---CHECK------------------><
    +-NO-+

Parameters:

None

Properties:

Default: None
Phase: Generator
$SET: Initial

Dependencies:

CHECK sets BOUND, LINKCHECK, PARAMCOUNTCHECK and RECURSECHECK immediately. NOCHECK sets NOBOUND, NOLINKCHECK, NOPARAMCOUNTCHECK and NORECURSECHECK immediately.

Comments:

CHECK turns on all run-time checks in generated code. The run-time checks include checks for:

  • Divide-by-zero.
  • Calling invalid (that is NULL) procedure-pointers.
  • Recursion of non-recursive programs.
  • INSPECT REPLACING a BY b statements where a and b are variable length items and at run time the lengths are not equal.

NOCHECK turns off all run-time checks in generated code.