The v60DecimalBehavior build
descriptor option controls the precision of an even-length DECIMAL,
MONEY, or PACF variable.
Before version 8, EGL was inconsistent in way it handled the precision
of DECIMAL, MONEY, and PACF variables for different target platforms
in the following situations:
- When values are assigned to the variables
- When mathLib.precision() returns a precision
for the variables
To simulate the behavior from version 6 and earlier, set the v60DecimalBehavior build
descriptor option to YES.
Values
The
v60DecimalBehavior build
descriptor option has the following values:
- YES
- Use the behavior that was defined as standard in version 6 and
earlier. The precision of an even-length DECIMAL, MONEY, or PACF variable
is incremented by 1, up to the maximum length. For the maximum length
of these variables, see Numeric types.
- NO (the default)
- Use the behavior that was standard after version 6. The precision
for any variable is as originally declared.
Default value
The default value of
v60DecimalBehavior depends
on the
vagCompatibility build descriptor
option:
- If vagCompatibility is set to YES, the
default value for v60DecimalBehavior is
YES.
- If vagCompatibility is set to NO, the
default value for v60DecimalBehavior is
NO.
Example
In the following example,
v60DecimalBehavior is
set to YES:
myVar DECIMAL(8,2);
myInt INT = mathLib.precision(myVar); // myInt = 9
If
you change v60DecimalBehavior to NO, myInt
becomes 8.
Compatibility
Table 1. Compatibility considerations
for v60DecimalBehavior| Platform |
Issue |
| JavaScript generation |
The option is ignored. The behavior is always
the default of v60DecimalBehavior = NO. |