The following code runs, but in order to make it compile, I had to change the symbol definition for p_button from C.3 to pinC.3. I presume that is because pin references in if...then statements must be in that format. Is there a workaround for that?
Thanks.
Thanks.
Code:
[color=Navy]#picaxe [/color][color=Black]08m2 [/color][color=Green]'Identify the PICAXE being used as an 08M2.[/color]
[color=Navy]#no_data [/color][color=Green]'Prevents data from being downloaded to PICAXE.
[/color][color=Blue]symbol g_led [/color][color=DarkCyan]= [/color][color=Blue]C.2
symbol y_led [/color][color=DarkCyan]= [/color][color=Blue]C.1
symbol r_led [/color][color=DarkCyan]= [/color][color=Blue]C.0
symbol light [/color][color=DarkCyan]= [/color][color=Navy]1000
[/color][color=Blue]symbol [/color][color=Purple]p_button [/color][color=DarkCyan]= [/color][color=Purple]pinC.3
[/color][color=Black]main: [/color][color=Green]'Start 'main' program.
[/color][color=Blue]if [/color][color=Purple]p_button [/color][color=DarkCyan]= [/color][color=Navy]0 [/color][color=Blue]then
high g_led
pause light
low g_led
endif
goto [/color][color=Black]main [/color][color=Green]'Go to 'main' program.[/color]