27297 Parallax Inc, 27297 Datasheet - Page 25

KIT STAMPWORKS WITH BS2-IC

27297

Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet

Specifications of 27297

Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
27297SQ
Manufacturer:
NS
Quantity:
4
In the second example, the loop statements will run at least once, even if the
condition evaluates as False. As you can see, the strength of DO-LOOP is that it
simplifies how and where the condition testing occurs.
DO-LOOP adds another type of testing with UNTIL.
By using UNTIL, the loop statements will run while the condition evaluates as False.
And, as demonstrated earlier, placing the test at the end of the loop will cause the
loop statements to run at least one time.
Another example of looping is the programmed loop using FOR-NEXT.
The FOR-NEXT construct is used to run a section of code a specific number of times.
FOR-NEXT uses a control variable to determine the number of loop iterations. The
size of the variable will determine the upper limit of loop iterations. For example, the
upper limit when using a byte-sized control variable would be 255. In the example
below, controlVar could be defined as a Nib (4-bit) variable as the end value is
less than 16:
FOR controlVar = startVal TO endVal STEP stepSize
NEXT
FOR controlVar = 1 TO 10
NEXT
DO
LOOP UNTIL (condition)
DO UNTIL (condition)
LOOP
statement 1
statement 2
statement 3
statement 1
statement 2
statement 3
statement 1
statement 2
statement 3
statement 1
statement 2
statement 3

Related parts for 27297