The Lambda Lab
/
projects
/
forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Implemented FILL and ERASE.
[forth.jl.git]
/
src
/
lib.4th
diff --git
a/src/lib.4th
b/src/lib.4th
index
38a8d14
..
ad6a3a5
100644
(file)
--- 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 ------------------------------------------------------ )