Kbase P185800: 4GL/ABL: Logical variable defined as "f/x" in the FORMAT option of the DEFINE VARIABLE displays wro
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  14/04/2011 |
|
Status: Unverified
SYMPTOM(s):
4GL/ABL: Logical variable defined as "f/x" in the FORMAT option of the DEFINE VARIABLE displays wrong UPDATE value.
Updating a logical variable in a frame using the UPDATE statement fails if the variable is formatted as "F/X" or "f/X" where X is any other character or expression.
Run the following code snippet from the Procedure Editor to see the issue:
DEFINE VARIABLE vLogical AS LOGICAL NO-UNDO FORMAT "F/X".
DISPLAY vLogical. /* The FALSE value X is displayed as expected */
UPDATE vLogical. /* Enter F to update the value to TRUE */
DISPLAY vLogical. /* Observe the FALSE value X is still displayed */
FACT(s) (Environment):
The UPDATE succeeds if the FORMAT is "X/Y" where X is any character other than "F" or "f" and Y is any other character or expression.
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
CAUSE:
Bug# OE00206587
CAUSE:
This is an old product defect. There are no plans to fix this bug.
FIX:
This behavior has been in the product since at least 9.1D and possibly longer. A workaround is to use any CHARACTER other than"F" or "f" to indicate the TRUE value in the FORMAT option of the DEFINE VARIABLE statement. For example, the following code displays the correct TRUE value of 'A' as expected:
DEFINE VARIABLE vLogical AS LOGICAL NO-UNDO FORMAT "A/X".
DISPLAY vLogical. /* The FALSE value X is displayed as expected */
UPDATE vLogical. /* Enter A to update the value to TRUE */
DISPLAY vLogical. /* Observe the TRUE value A is displayed as expected */