Showing results for 
Search instead for 
Did you mean: 

initialize undefined variables

Having uninitialized variables is, of course, poor practice but inevitable.  Using options like Qzero is not much better.  Zero is too forgiving.  On legacy hardware (e.g., CDC 7600) I would always preset memory to infinite or indefinite values because the use of such values in ANY arithmetic operation immediately threw a MODE error.  The question is then twofold:

(1) is there a way to set undefined variables scalars and arrays to a characteristic value that if used in an arithmetic operation will cause an immediate error, and

(2) what is a hex value that will result in such behavior.

0 Kudos
1 Reply

The only choice we offer here

The only choice we offer here is zero or, for floating point, a "signaling NaN", For integers, zero is your only option. /init:snan /init:arrays is probably what you want (but this requires a current version.)

Retired 12/31/2016
0 Kudos