Thank you everyone for your discussion. I have responded to each reply with my thoughts. While I do not expect things to change, I hope the discussion is useful to some. For me, it helped finding out that pinC.0 was a VARIABLE -- I had thought it was just the input form of the value for the leg C.0. I also did not realize that the IF statement does not accept a logical value, only a logical expression that must involve a variable.
Bob Shaw.
SAborn – No, it is NOT simple. It is NOT obvious. C.0 should be recognized by its context to be input or output. How can the value of a single pin have other than a 0 or 1 value unless perhaps used as an analog input?
Geoff07 – No. Even using symbol statements, you HAVE to use separate declaratives to define pinC.0 and C.0 separately. A professional writing the interpreter should not have had any difficulty in parsing with just C.0.
G6ejd – For learning purposes, the two forms are MORE confusing as well as unnecessary. With more learning, you CANNOT drop the pin with this compiler.
Technical – Yes, C.0 IS a constant, and refers to a specific hardware leg, which can have a value of 0 or 1. pinC.0 does appear to be a variable, as it can take on any byte value, but logically does not refer to the specific hardware leg. There should be no confusion in an if statement with something like if 5=7… -- it should logically be an if statement that is NOT TRUE. In fact, it should be the literal reference to 5 is not equal to the leteral reference of 7. The if statement seems to REQUIRE a variable in a logical expression which is probably the original necessity for pinC.0. If the if statement took as its argument a logical , then a statement like if 1 then … should be possible. So the current if statement cannot accept a logical value, only a logical expression which further must refer to a variable. Isn’t this rather confusing!
Haku – I agree with your comments.
Technical – I disagree. “pinC.0 = 1” should be thought of as a logical expression. There does not appear to be any reason that a VARIABLE pinC.0 refers to a specific leg, especially as it can be assigned not just a value of 1, but any byte value. (I didn’t check if it can in fact be any word value as well).
Nick12ab – This is just agreeing with the concept that C.0 is different than pinC.0.
Haku – Again, I agree with your comment. If the BASIC interpreter/compiler accepted C.0 and pinC.0 equally and inferred if being used as input or output, and pinC.0 was accepted as C.0 as input (legacy), I believe the PicAXE BASIC language would be improved (less confusing).