Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.9, Language Reference Manual

Using INONLY, INOUT and OUTONLY

Unless an argument is declared with the attribute INONLY or OUTONLY, the argument is INOUT and is presumed to have a value before it is passed and to be changed (possibly) by the called code.

When you declare an argument as INONLY, then the argument is presumed to have a value before it is passed but not to be changed by the called code. Hence a dummy argument would never need to be created for such an argument.

When you declare an argument as OUTONLY, then the argument is presumed not to have a value before it is passed but to be set by the called code.

The attributes OUTONLY and BYVALUE conflict and may not both be specified for the same argument.

The attributes INONLY and OPTIONAL also conflict and may not both be specified for the same argument.

The explicit use of these attributes makes your code more self-documenting. Furthermore, it allows the compiler to produce better code and to be more accurate in reporting possibly uninitialized variables.


Terms of use | Feedback

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