EasyManua.ls Logo

Parallax BASIC Stamp II - Timing and Looping Instructions

Default Icon
68 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Page 34 • BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333
BASIC Stamp II
FOR...NEXT
Establish a FOR...NEXT loop.
usage: FOR variable = start TO end {STEP stepval}
{some code}
NEXT
STEP is for specifying a step value other than the default of 1; if speci-
fied, stepval must be positive since whether to add or subtract stepval
from variable is determined dynamically at run-time (this allows ’10
TO 0' without specifying a negative STEP value.).
FOR...NEXT loops can be nested up to 16 deep.
Note: NEXT is stand-alone and implies the variable from the last FOR
statement.