A Frobyt or FROBYT is a for
-, from
-,
by
- or to
-part of a loop clause. Loops
featuring frobyts are endowed with an iterator, which may be explicit
or explicit, and they will never run indefinitely.
The following loop clause has frobyts for
and
to
, and has an explicit iterator i
. It iterates 100
times:
for i to 100 do ... od
The following loop clause has frobyts for
and while
, and
has an explicit iterator i
used to determine whether we are in
the first iteration. Since the loop is endowed with an iterator and
it doesn’t feature a to
-part, it will iterate at most
max_int
times, at which point the iterator would overflow:
for i while node :/=: no node do print ((name of node)); if i > 0 then print ((",")) fi; node := next of node od
The following loop is endowed by an interator, this time implicit, due
to the presence of the frobyt to
:
to 1000 while node :/=: no node do c process node c od
If the by
-part of a loop clause is negative, then the
to
-part defaults to min_int
.