327
Syntax:
WHILE conditionalexpression
[statementblock]
WEND
Description:
A
WHILE
...
WEND
continues to execute
statementblock
as long as the
con-
ditionalexpression
is true (not zero) according to the steps below.
(1) The
conditionalexpression
in the
WHILE
statement is evaluated.
(2) If the condition is false (zero), the
statementblock
is bypassed and control
passes to the first statement following the
WEND
.
If the condition is true (not zero), the
statementblock
is executed. When
WEND
statement is encountered, control returns to the
WHILE
statement. (Go
back to step (1) to be repeated.)
• The
WHILE
and
WEND
cannot be written on a same program line.
• If no
WEND
is written corresponding to the
WHILE
, a syntax error occurs.
• The BHT-BASIC does not support a
DO
…
LOOP
statement block.
• You can nest the
WHILE
...
END
statements to a maximum of 10 levels.
• When using the
WHILE
...
WEND
statement together with block-structured state-
ments (
DEF
FN
...
END
DEF
,
FOR
...
NEXT
,
FUNCTION
...
END
FUNCTION
,
IF
...
THEN
...
ELSE
...
END
IF
,
SELECT
...
CASE
...
END
SELECT
,
SUB
...
END
SUB
,
and
WHILE
...
WEND
), you can nest them to a maximum of 30 levels.
WHILE a
WHILE b
WHILE c
.
.
.
WEND
WEND
WEND
Flow control statement
WHILE...WEND
Continues to execute a statement block as long as the conditional expression is true.
Summary of Contents for BHT-BASIC 100 SERIES
Page 1: ......
Page 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Page 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Page 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Page 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...