quick spin question
dr hydra
Posts: 212
I am looking at code by Bob Belleville from the object exchange for use with IR input/output...the file name is ir_oscope.spin
My question relates to the line "if INA[irpin]" is that the same as "if INA[irpin] == 1"? It looks like comparsion value is missing in the orginal code...
My question relates to the line "if INA[irpin]" is that the same as "if INA[irpin] == 1"? It looks like comparsion value is missing in the orginal code...
Comments
INA[ irpin ] is a single bit, so it can only have values 1 or 0. But you can also see such an if-statement with other datatypes (byte, word or long):
if myByteVar
' do this
In fact the value has to be 0 to be false. Each other value will be seen as true by the if.