<< Click to Display Table of Contents >> Navigation: Reference > Formats > UZA Undefined as Zero in Arithmetic |
UZA is a logical format. The standard setting is NUZA (false).
UZA specifies that the U (undefined) is to be treated as Zero in arithmetic.
UZA is honoured in ivar and wvar definitions; it does not affect table manipulation.
For example:
dm $i1=u,
dm $i2=5,
di $ic1=$i1+$i2,
di $ic2=$i1-$i2,
di $ic3=$i1*$i2,
di $ic4=$i1/$i2,
with UZA $ic1 to $ic4 will have values of 5, -5, 0, 0 respectively. Without UZA they would all be U (undefined).
Note that divide by zero will not be errored with UZA; the result will be zero.