What is correct syntax for:
IF variable = 160 OR 192
I thought I put this statement inside the IF icon:
variable = 160 || 192
but I find that pretty much any value of the variable leads to the Yes branch and not just 160 or 192. All other values should lead to the No branch.
IF function
Moderator: Benj
-
kersing
- Valued Contributor

- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: IF function
The correct way to do this is:
variable = 160 || variable = 192
Your expression evaluates to:
IF (variable = 160) OR (192)
As 192 is not zero the result is always true, resulting in a 'Yes' branch.
variable = 160 || variable = 192
Your expression evaluates to:
IF (variable = 160) OR (192)
As 192 is not zero the result is always true, resulting in a 'Yes' branch.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: IF function
Many thanks.
Would be useful to put this in the Help file. I could find some limited info on AND, OR, etc. functions there but not much.
Would be useful to put this in the Help file. I could find some limited info on AND, OR, etc. functions there but not much.
Re: IF function
Hi
look in the boost c directory \Flowcode\v5\Tools\boostc and ther5s a manual that give some examples etc
ive attached it below
Regards
Dazz
look in the boost c directory \Flowcode\v5\Tools\boostc and ther5s a manual that give some examples etc
ive attached it below
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
Re: IF function
A related question. What is syntax for negative numbers?
In normal maths -20 is less than -10. But if I use in the IF icon:
variable<-10
and the variable =-20 it does not appear to return the yes answer.
I find I have to invert the numbers into positive numbers and do a more than rather than a less than test. But that uses more time/memory. Is there a simpler way?
In normal maths -20 is less than -10. But if I use in the IF icon:
variable<-10
and the variable =-20 it does not appear to return the yes answer.
I find I have to invert the numbers into positive numbers and do a more than rather than a less than test. But that uses more time/memory. Is there a simpler way?
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: IF function
The more minus you go the lower the number.
So -20 is less then -10
-10 is greater than -20
Martin
So -20 is less then -10
-10 is greater than -20
Martin
Martin