v60NumWithCharBehavior

The v60NumWithCharBehavior build descriptor option affects how EGL handles the NUM type in assignments and comparisons.

Starting with version 7, EGL treats the NUM type in the same way it treats other numeric types in assignments or comparisons to CHAR values.

If the v60NumWithCharBehavior build descriptor option is set to YES, EGL treats NUM type variables the way it did in earlier versions and in VisualAge® Generator. The differences in behavior are subtle and complex; you should set this option to YES only if you need to emulate VisualAge Generator. For more information, see the examples in this topic.

The v60NumWithCharBehavior option can affect the behavior of other build descriptor options such as spacesZero and blanksAsZero. For more information, see spacesZero and blanksAsZero.

Values

NO
EGL should treat the NUM type as it does all other numeric types.
YES
EGL should treat the NUM type as it did in VisualAge Generator.

Default value

The default value of v60NumWithCharBehavior depends on the vagCompatibility build descriptor option:
  • If vagCompatibility is set to YES, the default value for v60NumWithCharBehavior is YES.
  • If vagCompatibility is set to NO, the default value for v60NumWithCharBehavior is NO.

Manually setting the option

In most cases, you should not need to manually set the v60NumWithCharBehavior build descriptor option.

Examples

If v60NumWithCharBehavior is set to YES, you can make the following comparison:
if( "2009-03-26" > 0)
  ...
end

The 0 is converted to "0" for the comparison. In version 7 behavior, 0 is a number and the comparison fails because "2009-03-26" is an invalid number.

If v60NumWithCharBehavior is set to YES, EGL assigns a NUM to a CHAR using a byte move.
num_var NUM = -4;
char_var CHAR;

char_var = num_var; // value of char_var is 't'

In version 7 behavior, char_var would have a value of -4.


Feedback