Thanks,but when I use this code:

ButtonPressCounter = 0

SWITCH-LOOP:
IF PORTA.2 = 0 THEN
IF ButtonPressCounter = 3 THEN ButtonPressCounter = 0
ButtonPressCounter = ButtonPressCounter + 1
IF ButtonPressCounter = 1 THEN GOSUB Program1
IF ButtonPressCounter = 2 THEN GOSUB Program2
IF ButtonPressCounter = 3 THEN GOSUB Program3
ENDIF
GOTO SWITCH-LOOP:

Program1:
high portb.1
RETURN

Program2:
high portb.2
RETURN

Program3:
high portb.3
RETURN

WHEN I TRY COMPILE IN PIC BASIC,THEN GIVE ME THIS ERRORS!

ERROR Line 1: Syntax error.
ERROR Line 3: Syntax error.
ERROR Line 4: IF without a matching ENDIF.
ERROR Line 5: Bad expression.
ERROR Line 5: Bad expression or missing THEN.
ERROR Line 5: IF without a matching ENDIF.
ERROR Line 6: Syntax error.
ERROR Line 7: Bad expression.
ERROR Line 7: Bad expression or missing THEN.
ERROR Line 7: IF without a matching ENDIF.
ERROR Line 8: Bad expression.
ERROR Line 8: Bad expression or missing THEN.
ERROR Line 8: IF without a matching ENDIF.
ERROR Line 9: Bad expression.
ERROR Line 9: Bad expression or missing THEN.
ERROR Line 11: Syntax error.


I DO NOT NOW WHY,WHAT IS HAPPENED?