Page 1 of 1

Boolean operators

PostPosted: Tue Feb 12, 2002 6:58 am
by lazzarig
hi al Neobookers
I'm not a programmer and i would like know how i can use
boolean operators in neobook;
e.g. And  OR

thank
Giorgio Lazzari

Boolean operators

PostPosted: Tue Feb 12, 2002 9:57 am
by lazzarig
hi
1)if conditon 1is true AND condition 2 false
then
code.....
endif.
2)if conditon 1 is true OR condition 2is false
then
code.....
endif.
How is translated in neobook code ?

thank :-)
Giorgio Lazzari

Boolean operators

PostPosted: Tue Feb 12, 2002 3:31 pm
by West Side Wizard
There is no internal support for boolean operators.  You would have to use multiple if/else statements.  What exactly are you working on?  Perhaps we can find a  better alternative method as oppose to excessive amounts of multiple if/else statements.

Boolean operators

PostPosted: Tue Feb 12, 2002 4:31 pm
by NeoSoft Support
You can simulate a simple boolean AND by combining multiple items in a single NeoBook If statement. For example:

SetVar "[Var1]" "abc"
SetVar "[Var2]" "def"

If "[Var1][Var2]" "=" "abcdef"
  .do something
EndIf

This produces the same results as

If "[Var1]" "=" "abs"
 If "[Var2]" "=" "def"
   .do something
 EndIf
EndIf

Boolean operators

PostPosted: Wed Feb 13, 2002 2:11 am
by lazzarig
thank to Neobook support and to others neobooker.
with yours suggestions i solved my problem

Thank again
regards
Giorgio Lazzari

Boolean operators

PostPosted: Fri Jun 18, 2004 3:25 pm
by SpiritHorseNOOT
also for the "OR" statement you can do this

if "[myvar]" "=" "abc"
else
if "[myvar]" "=" "def"
.dosomething
endif
endif

Boolean operators

PostPosted: Fri Jun 18, 2004 11:15 pm
by HPW
Until neobook supports this native, you may use:

hpwAnd + hpwOr from hpwControl