THEN command?
Leticia Project
Posts: 30
Hi!
How can I use a IF and THEN command in BS2?
I would like to write a code like this:
Slow:
IF IN1=1 AND IN6=0 THEN
· GOSUB slowservo
ENDIF
RETURN
But the Debugger only tell me that THEN should have a label?
I want the program to continue on the next line, without using another label, is this possible?
Thank you!
How can I use a IF and THEN command in BS2?
I would like to write a code like this:
Slow:
IF IN1=1 AND IN6=0 THEN
· GOSUB slowservo
ENDIF
RETURN
But the Debugger only tell me that THEN should have a label?
I want the program to continue on the next line, without using another label, is this possible?
Thank you!
Comments
·' {$PBASIC 2.5}
-- you'll find a button on the toolbar that will insert this for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I don`t see why the program won`t accept this THEN command. Could I be using the wrong program? I`ve attached my program if anyone would like to try?
Thank you!
Jens Gr
Indeed you MUST be using the wrong program. The one you attached goes through the Stamp Editor/Compiler with NO ERRORS.
Regards,
Bruce Bates
Do make sure that you've got the latest version of our editor: 2.2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
As stupid as I am I used a the program from a old book about programming. I will download the new one right away!
Thank you!