From: Tim Vaughan Date: Mon, 2 May 2016 11:53:19 +0000 (+1200) Subject: Implemented FILL and ERASE. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=b27edfb401b367f76756f26be6f139f59c058a83;p=forth.jl.git Implemented FILL and ERASE. --- diff --git a/src/lib.4th b/src/lib.4th index 38a8d14..ad6a3a5 100644 --- a/src/lib.4th +++ b/src/lib.4th @@ -523,6 +523,17 @@ THEN ; +( Fill u ints, starting at a, with the value b ) +: FILL ( a u b -- ) + -ROT OVER + SWAP ?DO + DUP I ! + LOOP + DROP +; + +: ERASE ( a u -- ) + 0 FILL +; ( PRINTING THE DICTIONARY ------------------------------------------------------ )