Am 08.03.2020 um 20:18 schrieb Artur Tarassow:
changed early in the loop. Let me come up with a constructed example
--
I hope it shows my point for the usefulness of such a statement:
I would agree that in some ways the hansl syntax is less flexible than
that of other programming languages. However, I guess you need a better
or "more sharpened" example.
For example, I can rewrite your demonstration as follows:
<hansl>
scalar k = 2
loop i=1..3 -q
scalar n = randgen1(i, 0, 3)
if n == 0
# get out here and proceed with i++
else
if n == 1
# get out here and proceed with i++
else
# do something clever here
if k > 2
# get out here and proceed with i++
else
# do something clever here
endif
endif
endif
endloop
...
if n==0
...
elif n==1
...
elif k > 2
...
else
...
endif
which is pretty clean without any 'continue' statement.
cheers
sven