--- gforth/kernel/cond.fs 2010/12/31 18:09:02 1.24 +++ gforth/kernel/cond.fs 2012/08/27 13:33:48 1.29 @@ -1,6 +1,6 @@ \ Structural Conditionals 12dec92py -\ Copyright (C) 1995,1996,1997,2000,2003,2004,2007,2010 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,2000,2003,2004,2007,2010,2011 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -91,6 +91,9 @@ variable backedge-locals rdrop dup cs-item? ; +: CS-DROP ( dest -- ) \ gforth + dest? 2drop ; + : cs-push-part ( -- list addr ) locals-list @ here ; @@ -184,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 + UNLOOP EXIT THEN + cs-item-size +LOOP + true abort" no BEGIN found" ; immediate restrict + \ counted loops \ leave poses a little problem here