Help with code: Conditional Operator "AND"
TonyA
Posts: 226
I'm working on some code that goes like this:
RctimeVal = Reading from a force sensitive resistor
IF RCtimeVal = x
"and then"
RctimeVal = y THEN
Do This
Else
Do Nothing
Could the "AND" operator be used in place of my "and then" in the code above?
Thanks for any help.
Tony A
RctimeVal = Reading from a force sensitive resistor
IF RCtimeVal = x
"and then"
RctimeVal = y THEN
Do This
Else
Do Nothing
Could the "AND" operator be used in place of my "and then" in the code above?
Thanks for any help.
Tony A
Comments
I was wondering if something like this would work:
RCtimevalx Var BYTE
RCtimevaly Var BYTE
Main:
RCtime result = RCtimeValx 'reading from the FSR
RCtimevaly = ? 'don't know what to do here, or if this would work
IF (RCtimevalx = 0) AND (RCtimevaly > 0) THEN MidiOut
ELSE
SEROUT [noparse][[/noparse]Note off]
MidiOut:
SEROUT [noparse][[/noparse]Note on]
GOTO Main
Post Edited (TonyA) : 3/3/2006 2:21:06 PM GMT
kelvin
Tony A