27220 Parallax Inc, 27220 Datasheet - Page 24

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
When index is zero, the program will branch to Label_0, when index is one the
program will branch to Label_1 and so on.
Related to BRANCH is ON-GOTO, in fact, it can serve as direct replacement:
Programmers coming from a PC background are probably more familiar with ON-
GOTO, hence its inclusion in PBASIC 2.5.
LOOPING – RUNNING CODE AGAIN AND AGAIN
As demonstrated in the previous section, program loops can be created with
conditional and unconditional branching instructions.
including PBASIC 2.5, simplify looping with the DO-LOOP structure. With DO-LOOP
the branching label is no longer required. Here's how DO-LOOP is used to force
unconditional
As in the previous example, statements 1 - 3 will run in order, continuously.
The DO-LOOP construct can be made conditional by testing before or after the loop
statements:
In this example the loop statements will only run if and while the condition evaluates
as True.
ON index GOTO Label_0, Label_1, Label_2
DO
LOOP
DO WHILE (condition)
LOOP
DO
LOOP WHILE (condition)
statement 1
statement 2
statement 3
statement 1
statement 2
statement 3
statement 1
statement 2
statement 3
looping of number of code statements:
Modern variants of BASIC,

Related parts for 27220