Reference.DoWhile History

Show minor edits - Show changes to markup

May 26, 2007, at 02:25 PM by Paul Badger -
Changed line 18 from:
  delay(50);         // wait for sensors to stabilize
to:
  delay(50);          // wait for sensors to stabilize
May 26, 2007, at 02:25 PM by Paul Badger -
Added line 5:

[@

Changed lines 10-12 from:

Example

to:

@]

Example

May 26, 2007, at 02:24 PM by Paul Badger -
Changed lines 3-4 from:

The do loop works in the same manner as the while loop, with the exception that the condition is tested only after the loop has run, so the do loop will always run at least once.

to:

The do loop works in the same manner as the while loop, with the exception that the condition is tested at the end of the loop, so the do loop will always run at least once.

May 26, 2007, at 02:23 PM by Paul Badger -
Added lines 1-19:

do - while

The do loop works in the same manner as the while loop, with the exception that the condition is tested only after the loop has run, so the do loop will always run at least once.

do {

    // statement block

} while (test condition);

Example

do
{
  delay(50);         // wait for sensors to stabilize
  x = readSensors();  // check the sensors

} while (x < 100);

Share