Boolean comparison: (True <> False) = False ?
Hi,
I just ran into a weird issue using ReportBuilder 10.06. I was comparing
two boolean variables as "Var1 <> Var2", where Var1 is True and Var2 is
False, and it apparantly returned False. I simplified the code until the
values were hardcoded:
if True <> False then
ShowMessage('Not equal')
else
ShowMessage('Equal??');
...shows "Equal??". I worked around it by rewriting the code:
if not (True = False) then
...which does work as expected. Might want to take a look at it though
Regards,
Mark van Renswoude
I just ran into a weird issue using ReportBuilder 10.06. I was comparing
two boolean variables as "Var1 <> Var2", where Var1 is True and Var2 is
False, and it apparantly returned False. I simplified the code until the
values were hardcoded:
if True <> False then
ShowMessage('Not equal')
else
ShowMessage('Equal??');
...shows "Equal??". I worked around it by rewriting the code:
if not (True = False) then
...which does work as expected. Might want to take a look at it though
Regards,
Mark van Renswoude
This discussion has been closed.
Comments
Thanks for the info. There is now a patch for RB 10.07 that fixes this
issue. Send a small email to support@digital-metaphors.com to receive the
patch.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com