EasyManua.ls Logo

WILLTEK 4403 - Page 194

WILLTEK 4403
484 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...
Chapter 6 RAPID!
Commands
172 WCDMA Options Version 6.20
FOR ... NEXT
Examples
The three following examples perform the same task in
different manners. They all print a text to the screen until
a softkey is pushed:
DO
PRINT "Please push a softkey! ";
IF INKEY <> 0 THEN EXIT DO
LOOP
DO WHILE INKEY = 0
PRINT "Please push a softkey! ";
LOOP
DO
PRINT "Please push a softkey! ";
LOOP UNTIL INKEY <> 0
Syntax
FOR countVar = numStart TO numEnd [
STEP numStep ]
[ instructions ]
[ EXIT FOR ]
[ instructions ]
NEXT countVar
Parameters
countVar is a numeric variable,
numStart, numEnd, numStep are numeric expres-
sions,
instructions are an (optional) number of program
lines.
Description
Repeats a program segment a specified number of times.
To do so, a counter (
countVar) is used.
The initial value of the counter is stated in the
num-
Start
expression, while the final value is stated in the
numEnd expression.
After each run, the counter is increased by
numStep. If
the optional
STEP part is missing, the counter will be
incremented by 1 per run.
After the loop was run, the condition (
countVar =
numEnd
) will be checked. If the condition is false, the
loop will be run again.
If the condition is true, the program will resume with the
command following the
NEXT countVar command.
In order to immediately exit a
FOR...NEXT loop, use the
EXIT FOR command.
Examples
The following example program prints the ASCII charac-
ters A...Z to the screen:
FOR i=65 to 90
PRINT CHR$(i)
NEXT i

Table of Contents

Other manuals for WILLTEK 4403

Related product manuals