Compound IF statement.
SelfPropelled
Posts: 6
How might I implement the following IF structure in SX/B?
The test is to determine if X is between A & B:
If (A <= X AND X <= THEN
FOO= 1
Else
FOO= 0
ENDIF
This worked well in a DAQ BASIC environment on a PC, but generates 'invalid number of parameters' error in SX/B.
Any pearls of wisdom are welcome.
The test is to determine if X is between A & B:
If (A <= X AND X <= THEN
FOO= 1
Else
FOO= 0
ENDIF
This worked well in a DAQ BASIC environment on a PC, but generates 'invalid number of parameters' error in SX/B.
Any pearls of wisdom are welcome.
Comments
· IF X <= B THEN
··· FOO = 1
··ELSE
··· FOO = 0
··ENDIF
ELSE
· FOO = 0
ENDIF
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]