Issue 31043  —   Compiler error when passing a negated boolean as a parameter.

Status:   Solved in 10.2.01

Solution available in patch(es):      G101

Description:

 Summary:
 Uniface: Compile error when passing a negated boolean as a parameter

 Environment:
 +Uniface:          Version 8, 9
 +Operating System: All  versions
 +Database:         DBMS independent

 Symptoms:
 Passing a negated boolean value as a boolean parameter triggers
 a compiler error 1000 - Syntax error.

 For example:

   variables
     boolean   bval
   endvariables

   bval = 1

   call show1                  ( !bval )
   activate $instancename.show2( !bval )

 Both entry show1 and operation show2 have one boolean input parameter.

 The compiler flags an error on both statements:

   [        11]     5        call show1( !bval )
   (EXEC)    error:   1000 - Syntax error (Operator not valid)
   [        12]     6        activate $instancename.show2( !bval )
   (EXEC)    error:   1000 - Syntax error (Argument not valid)

 The compiler should accept negated booleans.

Workaround:

 Following workarounds are known:
 - Negate your boolean before passing it as a parameter.
 - Use an intermediate boolean variable to hold the negated value.
 - Surround the negated boolean with parenthesis: (!bool)

Notes: