"DO" commands interperted as a label
Archiver
Posts: 46,084
New to the BS2 world and could not find this in FAQs. Have tried this
from the "What's a Microcontroller?" book and got an error saying
that the label was already defined. The second "do" was highlighted.
'{$STAMP BS2}
'($PBASIC 2.5)
do 'Begin main loop
do 'Nested loop repeats until IN3=1
'Blank line in a wait loop
LOOP until IN3 = 1
LOW 14
HIGH 14
DEBUG "Hello World"
LOOP
from the "What's a Microcontroller?" book and got an error saying
that the label was already defined. The second "do" was highlighted.
'{$STAMP BS2}
'($PBASIC 2.5)
do 'Begin main loop
do 'Nested loop repeats until IN3=1
'Blank line in a wait loop
LOOP until IN3 = 1
LOW 14
HIGH 14
DEBUG "Hello World"
LOOP
Comments
DO...LOOP is only available in PBASIC 2.5 and the default version of PBASIC
used by the Editor is PBASIC 2.0.
Please check in your program the editor directive:
'($PBASIC 2.5)
You should use "{...}" and you used "(...)."
If you just click the icon with the icon indicating "2.5" or go to
Directive>PBASIC>Version 2.5, the Editor will write the directive for you.
So, you can edit your directive or make the editor inser a new one.
Saludos,
Aristides Alvarez
International Education Program Developer
aalvarez@p...
Parallax, Inc. www.parallax.com
California, USA
Original Message
From: "Don Lunn" <delunn@h...>
To: <basicstamps@yahoogroups.com>
Sent: Sunday, December 14, 2003 10:16 PM
Subject: [noparse][[/noparse]basicstamps] "DO" commands interperted as a label
> New to the BS2 world and could not find this in FAQs. Have tried this
> from the "What's a Microcontroller?" book and got an error saying
> that the label was already defined. The second "do" was highlighted.
>
> '{$STAMP BS2}
> '($PBASIC 2.5)
>
> do 'Begin main loop
> do 'Nested loop repeats until IN3=1
> 'Blank line in a wait loop
> LOOP until IN3 = 1
> LOW 14
> HIGH 14
> DEBUG "Hello World"
> LOOP
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>