Just a quick question, and maybe this is my old habit of trying to combine programming steps, from 52 years of programming experience, across a dozen or so different BASIC dialects. Just to get this out of the way, "PIR" is defined as a bit variable. I'm trying to combine the following 2 statements into a single statement (these work):
PIR = IN0 ' Read state of pin-0 into PIR variable. IF (PIR = 1) THEN GOSUB...
and this statement works:
IF (IN0 = 1) THEN GOSUB...
But this statement does not work:
IF ((PIR = IN0) = 1) THEN GOSUB... ' Read pin-0 into PIR and evaluate if that quantity = 1
It seems to load into the stamp correctly, but PIR is always zero. I've been messing with this for a few hours now, and I guess I don't understand why the BS2 can't evaluate (PIR = IN0) and then evaluate if that quantity = 1, or am I somehow doing it wrong, combining the statements? I'm probably missing something simple, but I'm stumped!