
GeoBASIC Reference Manual
2.GeoBasic Constructs
2-30 TPS1100-Version
1.30
Finish [ "
STEP
" Step ]
StatementSequence
"
NEXT
" [ CounterName ]
Condition ::=
LogicalExpression
Start ::=
IntegerExpression
Finish ::=
IntegerExpression
Step ::=
IntegerExpression
ExitStatement
::= ( LoopExit | RoutineExit )
LoopExit ::=
"
EXIT
"
2.6.3.1 The WHILE-Loop
If there is a condition, it is evaluated. If this yields
TRUE
, the statement sequence
is executed once, then the condition is re-evaluated. This continues until the
condition evaluates to
FALSE
, whereupon execution continues with the statement
following the loop.
If the condition yields
FALSE
the first time, the statement sequence is not
executed at all, and execution continues immediately with the statement following
the loop.
If there is no condition specified, the loop can only be left through an
EXIT
-
statement (see the note on the Exit-Statement at the end of this section), or through
the occurrence of a run time error.
An example is given after the description of the
UNTIL
-loop below.
2.6.3.2 The UNTIL-Loop
The statement sequence is executed, then the condition, if there is one, is
evaluated. If this yields
FALSE
, the statement sequence is executed again, then the
condition is re-evaluated. This continues until the condition evaluates to
TRUE
,
whereupon execution continues with the statement following the loop.
If no condition is specified, the loop can only be left through an
EXIT
-statement
(see the note on the Exit-Statement at the end of this section), or through the
occurrence of a run time error.
The statement sequence is executed at least once.
Examples:
♦
Assume, for instance, the following variable declarations.
CONST iMaxIndex AS Integer = 10
Содержание tps1100
Страница 1: ...GeoBASIC FOR TPS1100 User Manual Version 2 10 1997 2001 Leica Geosystems AG Heerbrugg Switzerland ...
Страница 150: ...GeoBASIC FOR TPS1100 Reference Manual Version 2 10 1997 2001 Leica Geosystems AG Heerbrugg Switzerland ...
Страница 411: ...GeoBASIC Reference Manual 6 System Functions TPS1100 Version 1 30 6 7 6 5 35 CSV_LibCallAvailable 6 213 ...
Страница 620: ...TPS1100 Version 2 10 6 1 ...
Страница 621: ......
Страница 623: ...TPS1100 Version 2 10 6 1 ...
Страница 624: ......
Страница 1053: ...TPS1100 Version 1 30 E 1 Appendix E GEOFONT ...
Страница 1154: ...GeoBASIC Reference Manual Appendix J List of Predefined Identifiers TPS1100 Version 1 30 J 9 TMC_SetOffsetDist 6 128 ...