From b27edfb401b367f76756f26be6f139f59c058a83 Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Mon, 2 May 2016 23:53:19 +1200 Subject: [PATCH] Implemented FILL and ERASE. --- src/lib.4th | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 ------------------------------------------------------ ) -- 2.20.1