Rocket Uniface Support Resources

 View Only

Uniface Technical Support: Compiler issue

  Thread closed by the administrator, not accepting new replies.
  • 1.  Uniface Technical Support: Compiler issue

    ROCKETEER
    Posted 11-19-2018 11:51
    No replies, thread closed.

    Compiler issue

    Author: jan.cees.boogaard@uniface.com (JanCees)

    In our current version of Uniface there is a compiler issue known as bug 30834, “Compiler does not report certain syntax errors in conditions”. The compiler allows invalid expressions in Uniface code. No error is raised during compilation and a compiled component is produced. An example of such an invalid expression is

    if 1 = 1 + ; invalid as it is incomplete because there is an operator and no operand follows

       ; Uniface code A

    else

       ; Uniface code B

    endif   Here the “1 = 1 +” is accepted by the compiler and will always be evaluated as “false” in runtime. So always executing Uniface code B in the example above. Please note that the problem occurs for any and in any situation where it is used, so also in loops, proc instructions like ‘discard’ and ‘remocc’ and also in read using constructions. This problem will be fixed in patch X604, which is scheduled for release on March 23rd. With the fix in place, the compiler will properly report an error for these expressions during compilation and no longer produce a compiled component. After the erroneous expression is corrected and a new version of the component compiled properly, there is a chance that the change that was made will have a functional impact on the component. The expression that always evaluated to “false” before may now be evaluated to “true” which will influence the execution of the Uniface code. In the example code above, either Uniface code A and Uniface code B may be executed once the expression is corrected. The fix in the compiler will only affect components with invalid expressions as mentioned above. As those will now give an error, the component will not be compiled. Components that do not contain invalid expressions will compile exactly like before. So installation of X604 will not require all runtime components to be recompiled and replaced. Only repaired components need to be replaced.  The problem in the compiler was introduced in Uniface version 9.5.01.The compiler improvement will become available in Uniface versions 9.6.06/X604 and higher. Uniface developers who want to check their components in versions of Uniface between 9.5.01 and 9.6.06/X603 can compile their code in a Uniface 9.6.06/X604 environment to find the invalid expressions. Should the compiler report an error about an invalid expression in one or more components, then this error can be corrected in the preferred development environment.   If you have any questions or problems regarding this fix, then please contact Uniface Technical Support.