Kbase P122663: 4GL/ABL: Errors (13682) and (5678) using the PUT-BITS statement.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/3/2008 |
|
Status: Verified
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.1B
SYMPTOM(s):
4GL/ABL: Errors (13682) and (5678) using the PUT-BITS statement.
Value <value> too large to fit in INTEGER data type. (13682)
Unable to do run-time conversion of data types. (5678)
4GL code is setting the 32nd bit to create a negative integer value
4GL code works without error prior to 10.1B
CAUSE:
The behavior prior to 10.1B is consistent with the fact that the maximum integer size in computations inside the 4GL is 32-bit wide, signed. In that context:
- setting the 32nd bit in an integer makes it negative,
- any value set using put-bits can be passed around, safely assuming that it is left unchanged and triggers no error.
In OpenEdge 10.1B a new data type was introduced for 64-bit integer, and PUT-BITS is now 64-bit enabled.
Setting the 32nd bit will now generate a positive value. When that happens, since the value is positive there is no way the 4GL can automatically convert it to a 32-bit integer without losing information (its sign). Hence the error, consistent with the new feature.
FIX:
For OpenEdge 10.1B or later, define the variables that will be used with the PUT-BITS statement AS INT64 data type.