on BUG 31043 - Compiler error when passing a negated boolean as a parameter

Author: ulrichmerkel@web.de (ulrich-merkel)

on http://unifaceinfo.com/fixes/issuelist/31043.php is reported the compier can not handle the !boolean as parameter.
As workaround, it is suggested:
Negate your boolean before passing it as a parameter. Or use an intermediate boolean variable to hold the negated value.
 
Using a global function NOT would be much more comfortable:
; call show1                  (!bval) ; causes the error
 call show1                  (NOT(bval) ) ; works without temporary assignments etc.
entry NOT
returns boolean
params
   boolean p_bool : IN
endparams
return !p_bool
end ; NOT

Greetings from Frankfurt/Germany,
Uli

This page has no comments.