excerise 8 chapter 3
KDDonald
Posts: 2
No where in the chapter does it discuss the DO WHILE statement.· Can you help me in figure how to install thes commands so that the board will work.
Comments
·· Please specify the book you are referring to.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
' {$PBASIC 2.5}
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
Http://www.parallax.com
·
do while/until
do
while "run loop if condition are true"
until "terminate loop if condition are true"
loop
are condition true or false ?
you can always clear the code by running an erase program to the stamp
if the stamp is locking up ?
DO
LOOP UNTIL condition
It keeps repeating –until- you have pressed the button (IN3 = 1).
The exercise is telling you to modify the loop so that it looks like this:
DO WHILE condition
LOOP
Instead of repeating the loop –until- a particular condition happens, the loop should keep repeating –while- a condition is true (while the button is not pressed). So, what's the value of IN3 when the button is pressed. What's the value of IN3 when the button is not pressed? What condition do you want to put in there?
It’s good that you’re looking things up in the PBASIC Syntax Guide. You’ll get better at understanding the syntax descriptions with practice. You can also download the BASIC Stamp Manual (or open it from your CD like in Chapter 1). In many cases, there will be more explanations and example programs there.