2020-04-25 21:54:07 -04:00
|
|
|
( Increase loop counter and returns whether we should loop. )
|
|
|
|
: _
|
|
|
|
R> ( IP, keep for later )
|
|
|
|
R> 1+ ( ip i+1 )
|
|
|
|
DUP >R ( ip i )
|
|
|
|
I' = ( ip f )
|
|
|
|
SWAP >R ( f )
|
|
|
|
;
|
|
|
|
( One could think that we should have a sub word to avoid all
|
|
|
|
these COMPILE, but we can't because otherwise it messes with
|
|
|
|
the RS )
|
|
|
|
: LOOP
|
|
|
|
COMPILE _ COMPILE (?br)
|
|
|
|
H@ - ,
|
2020-05-06 09:49:37 -04:00
|
|
|
COMPILE 2R> COMPILE 2DROP
|
2020-04-25 21:54:07 -04:00
|
|
|
; IMMEDIATE
|