\ : compile, postpone literal postpone execute ; [undefined] defer@ [if] : defer@ >body @ ; \ works on SwiftForth [then] : Defers ( compilation "name" -- ; run-time ... -- ... ) \ Compiles the present contents of the deferred word @i{name} \ into the current definition. I.e., this produces static \ binding as if @i{name} was not deferred. ' defer@ compile, ; immediate ' if defer if immediate is if : foo1 0 ?do dup c@ [char] a [char] z 1+ within if dup c@ emit then 1+ loop drop ; s" 123abcABC" foo1 cr variable total-ifs variable then-branches : inc-total ( -- ) 1 total-ifs +! ; : inc-thens ( -- ) 1 then-branches +! ; :noname ( compilation -- orig ; run-time f -- ) postpone inc-total defers if postpone inc-thens ; is if : foo2 ( c-addr u -- ) 0 ?do dup c@ [char] a [char] z 1+ within if dup c@ emit then 1+ loop drop ; s" 123abcABC" foo2 total-ifs ? then-branches ? cr