Do Loops in Pbasic
Adams449
Posts: 3
in BASIC Stamp
I am currently building the BOE-BOT. My hardware is ' {$STAMP BS2} ' {$PBASIC 2.0}.
Pbasic is running fine and shows commands in blue on my Windows 8.1 PC. When I do a "DO LOOP", neither command is blue and it does not loop. Have tried many things and still looks like I have a Software Package or Hardware issue. I have used do loops in at lease 3 or 4 other programing languages and I know what to expect. I have inserted messages for me to debug with and they show one time and then out of the loop and on with the program. It does not give me an error message, it just reads and ignores the commands. Any help is appreciated. Thanks Floyd (New User)
Pbasic is running fine and shows commands in blue on my Windows 8.1 PC. When I do a "DO LOOP", neither command is blue and it does not loop. Have tried many things and still looks like I have a Software Package or Hardware issue. I have used do loops in at lease 3 or 4 other programing languages and I know what to expect. I have inserted messages for me to debug with and they show one time and then out of the loop and on with the program. It does not give me an error message, it just reads and ignores the commands. Any help is appreciated. Thanks Floyd (New User)
Comments
You probably want to be using PBasic 2.5. (Select at the top of the IDE).
You can check to see if you have the latest PBasic package:
https://www.parallax.com/Downloads
Could you post the code here so we can take a look at it?
At the top of your program, change '{PBASIC 2.0} to '{PBASIC 2.5}, and make sure it's on a line by itself.
-Phil
This is one of the best forums around.
At the top of the PBASIC IDE, you'll see a string of Stamp icons and to the right of those, a set of three cogs(?) labeled 1.0, 2.0, and 2.5.
Clicking on the Stamp icons will insert the various {$STAMP BS?} directives at the top of the open edit window. Clicking on the cogs will insert the {$PBASIC 2.?} directives on the next line.
From one old/newbie to another,
Dave