Details
-
Type: Maintenance
-
Status: Fixed (View Workflow)
-
Resolution: Unresolved
-
Labels:None
-
Old bug number:28508
-
Patch version:P210,R101
Description
Uniface evaluates a condition under specific circumstances sometimes as TRUE
and sometimes as FALSE depending on what happened earlier with the variables
involved.
For example, lines (1) and (3) below test exactly the same condition, with
exactly the same values for the variables involved. Yet, in the first case it
is TRUE, in the second it is FALSE.
variables
boolean b
numeric n
string s
endvariables
b = 1
n = 1
s = "false"
if (n&s) ... ; (1) TRUE
if (b&s) ... ; (2) FALSE
if (n&s) ... ; (3) FALSE
The cause for this is in the way the Proc interpreter does implicit conversion
from string values to numeric values, and how it decides to re-attempt such
conversions.