27297 Parallax Inc, 27297 Datasheet - Page 22

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
BRANCHING – REDIRECTING PROGRAM FLOW
A branching instruction is one that causes the flow of the program to change from its
linear path. In other words, when the program encounters a branching instruction, it
will, in almost all cases, not be running the next [linear] line of code. The program
will usually go somewhere else, often creating a program loop. There are two
categories of branching instructions:
instructions, GOTO and GOSUB that cause unconditional branching.
Here’s an example of an unconditional branch using GOTO:
We call this an unconditional branch because it always happens. GOTO redirects the
program to another location. The location is specified as part of the GOTO instruction
and is called an address. Remember that addresses start a line of code and are
followed by a colon (:). You’ll frequently see GOTO at the end of the main body of
code, forcing the program statements to run again.
Conditional branching will cause the program flow to change under a specific set of
circumstances.
construct.
specifically to redirect program flow to another point based on a tested condition.
Take a look at this listing:
In this example, statements 1- 3 will run at least once and then continue to run as
long as the condition evaluates as True. When required, the condition can be tested
prior to the code statements:
Label:
Start:
statement 1
statement 2
statement 3
GOTO Label
statement 1
statement 2
statement 3
IF (condition) THEN Start
PBASIC includes two distinct versions of IF-THEN; the first is used
The simplest conditional branching is done with an IF-THEN
unconditional
and
conditional
. PBASIC has two

Related parts for 27297