This is part of the HicEst documentation
DO: First Statement of a standard Loop
Start index, end index and step size can be controlled by the loop parameters. This is in contrast to HicEst inline-loops or EDIT-loops.
⇾Home
⇾Contents
⇾more Programming
⇾ Examples
The DO loop controls the repeated execution of a block of statements or constructs
The loop variable loopvar is set to loopstart to loopend in steps of loopstep (default is 1):
loopstart, loopend, and loopstep are numerical values or expressions
DO loopvar = loopstart, loopend, loopstep
! loopstep=1 can be omitted
! ... block of statements or constructs
ENDDO
! the terminating statement of a DO loop
Alternatively, a DO loop can be written with a terminating label (e.g. 999):
DO 999 loopvar = loopstart, loopend, loopstep
! loopstep=1 can be omitted
! ... block of statements or constructs
999
CONTINUE
This allows a
GOTO
to the last (non executable)
CONTINUE
statement. This is not recommended, better is to use an
IF
construct.
There are simple loop operations, that can be programmed more efficiently by
array operations
.
For many repetitive array and string operations
InlineLoop
programming creates an efficient single line statement
EDIT
provides another single line loop possibility
To exit a loop prematurely a
RETURN
,
GOTO
, or a function error exit can be programmed
⇾ programming (execution control)
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.