Source language: Translate to:

Boolean operators

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Boolean operators

Postby lazzarig » Tue Feb 12, 2002 6:58 am

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
lazzarig
 

Boolean operators

Postby lazzarig » Tue Feb 12, 2002 9:57 am

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
lazzarig
 

Boolean operators

Postby West Side Wizard » Tue Feb 12, 2002 3:31 pm

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.
West Side Wizard
 

Boolean operators

Postby NeoSoft Support » Tue Feb 12, 2002 4:31 pm

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
NeoSoft Support
 

Boolean operators

Postby lazzarig » Wed Feb 13, 2002 2:11 am

thank to Neobook support and to others neobooker.
with yours suggestions i solved my problem

Thank again
regards
Giorgio Lazzari
lazzarig
 

Boolean operators

Postby SpiritHorseNOOT » Fri Jun 18, 2004 3:25 pm

also for the "OR" statement you can do this

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

Boolean operators

Postby HPW » Fri Jun 18, 2004 11:15 pm

Until neobook supports this native, you may use:

hpwAnd + hpwOr from hpwControl
HPW
 


Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 0 guests

cron