Rebol [ Title: "Twhile" File: %twhile.r Date: 23-Aug-2005/10:32:41+2:00 Author: "Ladislav Mecir" ] #include-check %tfunc.r twhile: tfunc [ {a transparent while} cond-block [block!] body-block [block!] /local result1 result2 break' ] [ break': use [break] [ break: func [[throw] /return value [any-type!]] [ either return [return' get/any 'value] [exit] ] 'break ] cond-block: bind/copy cond-block break' body-block: bind/copy body-block break' result1: true error? set/any 'result2 while [ set/any 'result1 do cond-block if not value? 'result1 [ throw' make error! [script no-return] ] :result1 ] body-block either :result1 [ break/return get/any 'result2 ] [get/any 'result2] ] comment [ ]