Re: Repeat .... UNTIL code
RETURN is used with GOSUB.
You will want GOTO CHECK
From the manual:
Quote:
RETURN
Return from subroutine. RETURN resumes execution at the statement following the GOSUB which called the subroutine.
Gosub sub1 ' Go to subroutine labeled sub1
...
sub1: Serout 0,N2400,[“Lunch”] ' Send “Lunch” out Pin0 serially
RETURN ' Return to main program after Gosub
Re: Repeat .... UNTIL code
and RETURN i should use,too?
Re: Repeat .... UNTIL code
Maybe that is not your whole code? But basically code should be structured something like:
Code:
MAIN:
'Do stuff
GOSUB SubCode 'Jumps to label SubCode
GOTO SomeCodeBlock
GOTO MAIN ' Goes back to MAIN label
SomeCodeBlock:
'Do Stuff
GOTO MAIN ' Goes back to MAIN label
SubCode:
'Do Stuff
RETURN ' Takes you back to the line after the GOSUB
Re: Repeat .... UNTIL code
You should read the Termos value within the Repeat/Until loop, or you will never exit from the loop.
Cheers
Al.