Basic Programming newbie
peteraltman
Posts: 4
·Just getting started and I need some help with the LOOP statement. How doyou break out of the loop once your input is met?
ie:
DO
IF· (IN3=1) then ???? how do I go tp my next statment once this is me?
LOOP
Next statement Here
ie:
DO
IF· (IN3=1) then ???? how do I go tp my next statment once this is me?
LOOP
Next statement Here
Comments
Loop until (IN3 =1)
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thank you very much.
Pete
Note that Chris Savage is using the work "Exit" as a lable·for another part of the program as in...
Main:
DO
· IF IN3 = 1 THEN Go_to_this_part
LOOP
Go_to_this_part:
' do something different here
...
I believe EXIT was added with version 2.5 as a means to exit loops cleanly, so it's actually an instruction and not a label.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I am an "old-head" code cutter. The last time I used a language that forced one to utilize a "premature exit" was the 8008 instruction set, one bit at a time! However, I admit that Parallax's implementation of it makes a lot of sense.
Ha! I am LOOKING at the machine I used it on! Wonder what it is worth today? (Nothing, probably.)
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.