| View previous topic :: View next topic |
| Author |
Message |
aaffe
Joined: 17 May 2007 Posts: 66
|
Posted: Fri Dec 14, 2007 1:31 pm Post subject: Combining serveral ANDs and ORs with if and Variables |
|
|
Hallo,
I´ve got a question.
In an If-Command, you can use variables in exporessions like
| Code: |
If (varA > varB) ....
|
of you can use it like this:
| Code: |
if varA > %varB....
|
But how to write it if I want to combine several ands and ors in if-command?
do it like this?
| Code: |
If (varA > varB) or (varC > var D) and (varA != varD) ...
??
|
Is this right to combine them?
or do you write it like this:
| Code: |
If varA > %varB% and %varC% > %varD% ...
|
or like this?
| Code: |
If varA > %varB% and VarC > %VarD% ...??
|
Can you help me please?
Thanx, aaffe |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1348
|
Posted: Fri Dec 14, 2007 6:59 pm Post subject: |
|
|
| Code: | | If (varA > varB) or (varC > varD) and (varA != varD) ... |
is fine, except you shoulde use extra brackets so you know which order to do them in...
ie..
| Code: | | If ((varA > varB) or (varC > varD)) and (varA != varD) ... |
|
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 66
|
Posted: Mon Dec 17, 2007 2:22 pm Post subject: |
|
|
| Thanx a lot, tic! |
|
| Back to top |
|
 |
|