IF THEN ELSE-Statement
New to programming and need help. Is there anyway to use the THEN logic statement to simply post a DEBUG remark. Such as: If (IN3=1) THEN DEBUG "IN2 needs to be low". Appreciate any advice. Thank you, Warren
Comments
IF IN3=1 THEN DEBUG "Oops, IN3 is high",CR
or on multiple lines like:
IF IN3=1 THEN
DEBUG "Oops, IN3 is high",CR
ENDIF
The CR is a constant name that is equal to 13 which is a carriage return character.
If you haven't gone through it yet, I'd recommend that you read (and work through the exercises) from "What's a Microcontroller?" that you can find here along with a lot of other educational material.
Thanks for the reply. I left out the CR and the DEBUG editor kept going to the THEN line and giving me an error message; like error 152 and I couldn't figure out where to find the list of associated error definitions assigned to the message number (still don't). Will try again tonight after work. -Warren