Skip to content
Browse files

Added continue control structure

  • Loading branch information...
1 parent 69659c8 commit e4d43283f167a5efb53d30c05c0522ef1537fda1 pazsan committed Aug 21, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 kernel/cond.fs
View
10 kernel/cond.fs
@@ -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

0 comments on commit e4d4328

Please sign in to comment.
Something went wrong with that request. Please try again.