- Evaluating numeric or string comparisons like your
'(l = "_")' does not provide a Boolean but an Integer with two possible values:
'0' (NOK) or
'-1' (OK):
0
-1
- At opposite, only evaluating boolean comparisons like your
'(p = true)' provides a Boolean:
Code: Select all
print (false = true)
print (false = false)
false
true
Therefore, your logical operators mix integer and boolean operands.
To remove the warning, a solution is for example to convert such integer results into boolean:
r = cbool(l = " ") or cbool(l = "_") or (cbool(l = ",") and (d = false) and (p = true))
Note:
There is no specific keyword to convert a boolean into a numeric type, but general syntax like:
Cast(Integer, boolean_variable)