sv806
04-25-2007, 07:31 AM
a couple codes i found in the help file for pbasic, i was wondering if the ( ) are needed in the first code? and what is bin1 in7, CR do?
Setup:
INPUT 4
Hold:
IF (IN4 = 0) THEN Hold ' Stay here until P4 is 1
---------------------------------------------------------------------
Main:
INPUT 7 ' Make P7 an input
DEBUG "State of P7: ",
BIN1 IN7, CR
OUT7 = 0 ' Write 0 to output latch
DEBUG "After 0 written to OUT7: ",
BIN1 IN7, CR
OUTPUT 7 ' Make P7 an output
DEBUG "After P7 changed to output: ",
BIN1 IN7
END
Setup:
INPUT 4
Hold:
IF (IN4 = 0) THEN Hold ' Stay here until P4 is 1
---------------------------------------------------------------------
Main:
INPUT 7 ' Make P7 an input
DEBUG "State of P7: ",
BIN1 IN7, CR
OUT7 = 0 ' Write 0 to output latch
DEBUG "After 0 written to OUT7: ",
BIN1 IN7, CR
OUTPUT 7 ' Make P7 an output
DEBUG "After P7 changed to output: ",
BIN1 IN7
END