Question on Basic program
tigershark35
Posts: 60
Hi.
Here is a piece of a program and I get an error that I don't understand.
GOSUB findtimes
DEBUG CR, "HERE"
IF time1 > timeref1· THEN
GOSUB Sub_up
· else
IF time1 < timeref1·· THEN
GOSUB Sub_down
· else
·· END IF
·· END IF
When I run it, I get an error "expected label"·after the first "then".· Do I have to declare the·subroutine names?
Any help will be appreciated.
JG
Here is a piece of a program and I get an error that I don't understand.
GOSUB findtimes
DEBUG CR, "HERE"
IF time1 > timeref1· THEN
GOSUB Sub_up
· else
IF time1 < timeref1·· THEN
GOSUB Sub_down
· else
·· END IF
·· END IF
When I run it, I get an error "expected label"·after the first "then".· Do I have to declare the·subroutine names?
Any help will be appreciated.
JG
Comments
...
END
Sub_up:
do stuff
RETURN
Sub_Down:
do stuff
RETURN
·· My guess is you don't have a PBASIC 2.5 directive in your code.· You can insert it from the Directive Menu, PBASIC, then 2.5 or click the icon that says 2.5 on your toolbar.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I just sent an email to Support on the subject before I saw your reply here.· I did the controlT and did not get the error.·
Jim G.