If you start with the following ...
High 0
High 1
They will set pin 0 and pin 1 high respectively.
OK - Understood
You could also have used a variable which contained 0 or 1, and that would do the same thing ...
b0 = 0
High b0
b0 = 1
High b0
Of course you could have any number in b0 to set any of the pins 0 through 7 high ( for a PICAXE which has 8 outputs ).
OK - So, if b4 contained value 3 then High b4 would set output 3 to 5v. If it contained 2 then it would set output 2 to 5v.
So then it would follow that Low b4 would set output 3 to 0v (or low) volts (assuming b4 contained 3?
You can also read the status of an input pin and put it in a variable ...
b0 = pin3
This will put a 0 or a 1 into b0 depending on the voltage applied to input pin 3 leg.
Understood
So ...
b0 = pin3
High b0
Input pin3 can be low or high, b0 will be 0 or 1 respectively, output pin 0 or 1 will be set high.
This is where I start reaching for the paracetamol, because not least it makes the program hard to follow. I'll try: So you're testing for the value at absolute pin 3, thats input 3. It can only be (as you said) a 1 or a 0. If it is a 1 then set ouput pin 1 high else set output 0 (pin0) high. So at this stage in the program you have now definatately set an output to On, but you dont know which one*, and there is every possibility that the next (or subsequant) lines of code will change the value of pin3 (which may or may not alter the output that has just been set).
*Unless you stick that value in a var for later use, or test it now, which is why I cant see how this could be a useful command to use, because it makes it hard to follow the program (IMHO).
Maybe there are circumstances that it is useful? Set either of 2 alarms/LEDs, leaving it up to the user to intervene; but then User has to be present, and notice the condition, then to intervene tho...
Because 'pin3' is a variable, just like 'b0' is a variable, you don't have to take the intermediate step of moving pin0 into b0 but could - if we allowed it - use ...
High pin3
So you're not saying "put pin3 high", what you are saying is read "pin3" and if low set pin 0 high, if high set pin 1 high.
Effectively it is the same as ...
If pin3 = 0 Then : High 0 : End If
If pin3 = 1 Then : High 1 : End If
So really its all a moot point because you're saying this is not an allowed command anyway?
Well! Headache gone, I think.
Thanks for the explanation Hippy. I can almost hear you (and others too) banging your head