Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Migration Guide

RULES(NOLAXIF)

The expressions in IF, WHILE, UNTIL and undominated WHEN clauses should have the attributes BIT(1) NONVARYING; however, all the new and old compilers would allow any computational expression in these clauses. For example, you could write:

     dcl x fixed bin(31);

     if x then ...

You may have intended this IF statement to mean the same as the following statement:

     if x ¬= 0 then

But the old and new compilers will interpret the statement as:

     if abs(x) ¬= 0 then

It would be much better to code this statement and similar statements so that the conditional expression was a boolean.

Under the compiler option RULES(NOLAXIF), the compiler will flag with an E-level message any conditional expression that does not have the attributes BIT(1) NONVARYING. Hence you can use this option to enforce this good coding practice.

Under RULES(NOLAXIF), the compiler will also flag an IF clause consisting of just a reference to a BIT(8) variable, say Y. In this case, the generated code will treat the expression as true if any of the 8 bits is on, but it might be better to change this IF clause to Y ^= ’’b.

Note that the RULES(NOLAXIF) option will have effect on the code generated for any statement that it flags.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)