Skip to content

Commit

Permalink
Added continue control structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pazsan committed Aug 21, 2012
1 parent 69659c8 commit e4d4328
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kernel/cond.fs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ IS until-like
POSTPONE again
POSTPONE then ; immediate restrict

\ not clear if this should really go into Gforth's kernel...

: CONTINUE ( dest-sys j*sys -- dest-sys j*sys ) \ gforth
\g jump to the next outer BEGIN
depth 0 ?DO I pick dest = IF
I cs-item-size / cs-pick postpone AGAIN
LEAVE THEN
cs-item-size +LOOP
true abort" no BEGIN found" ; immediate compile-only

\ counted loops

\ leave poses a little problem here
Expand Down

0 comments on commit e4d4328

Please sign in to comment.