how program flow works
westhaust and phil75 I really appreciate your help,but I am still confused.The examples you refer to in the manuals are to flash on and off.I am just trying to create a simple AND gate.
If I turn off an input and goto main why do I still get an output?
Please don't smack my bum for this question,I am getting too old!
To expand further on what Technical has said . . .
When you use the command "GOTO Main", this does not reset the PICAXE.
Variables retain the values they had and outputs retain their state, all as it was just before the "GOTO Main".
If you really want to reset everything, then you need to use the RESET command - see PICAXE manual 2 page 149.
So if you do not want to use the reset command becasue you want to retain the variable values etc, then you need to force the output to the next desired state. In your case off or LOW.
Hope that makes sense for you.