Greater than and less than Code
Brian_B
Posts: 842
I'm trying to make a descion if the value of a variable is between 1 and 8. I've tried a couple differnt ways but I can't get it to work ,here is one sample
code.......
IF variable1 =<1 & =>8
do somthing
ELSE
do somthing differnt
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
www.PropelX.com
code.......
IF variable1 =<1 & =>8
do somthing
ELSE
do somthing differnt
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
www.PropelX.com
Comments
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
I have just lately started using case and find it very handy for some things.
This is mathmatical form of the logical expression, a result of 0 (FALSE) indicates the variable is between 1 and 8. Don't know which form is faster.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 9/1/2008 9:44:52 PM GMT
I used Phils version just to get it done ,but I plan on checking into the other ones
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
www.PropelX.com