Shop OBEX P1 Docs P2 Docs Learn Events
excerise 8 chapter 3 — Parallax Forums

excerise 8 chapter 3

KDDonaldKDDonald Posts: 2
edited 2005-09-14 03:34 in Learn with BlocklyProp
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

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-06 20:11
    Hello,

    ·· Please specify the book you are referring to.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-06 20:59
    When all else fails, consult the help file where DO-WHILE is discussed. What you'll find is that you have enable PBASIC 2.5 syntax -- like this:

    ' {$PBASIC 2.5}

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • KDDonaldKDDonald Posts: 2
    edited 2005-09-08 20:02
    I am using the What's a Microcontroller version 2.1.· I tried the Help on the program and it did not find anything under DO ... While statement.· It actually froze the program.· Is there any where else I can research this statement.
  • dandreaedandreae Posts: 1,375
    edited 2005-09-08 21:31
    You can access the "Help" file by clicking on "Start" in Windows and then click on "Programs" and then click on the "Parallax" folder and access the "Help" file from there.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • japerjaper Posts: 105
    edited 2005-09-14 00:46
    ok had to look through the syntax book
    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 ?
  • edited 2005-09-14 03:34
    On page 91, there is an example of a DO...LOOP UNTIL code block.

    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.
Sign In or Register to comment.