From b5638d142a0c40750ada001536827863300eceec Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 8 Apr 2020 20:40:23 -0400 Subject: [PATCH] Add word "DELW" --- dictionary.txt | 2 ++ forth/core.fs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/dictionary.txt b/dictionary.txt index 1499f55..f8dcb88 100644 --- a/dictionary.txt +++ b/dictionary.txt @@ -38,6 +38,8 @@ CREATE x -- Create cell named x. Doesn't allocate a PF. words are *not* executed. COMPILE x -- Meta compiles. Kind of blows the mind. See below. CONSTANT x n -- Creates cell x that when called pushes its value +DELW x -- Delete word x. If it shadows another definition, + that definition is unshadowed. DOES> -- See description at top of file IMMED? a -- f Checks whether wordref at a is immediate. IMMEDIATE -- Flag the latest defined word as immediate. diff --git a/forth/core.fs b/forth/core.fs index 514fb63..54136a0 100644 --- a/forth/core.fs +++ b/forth/core.fs @@ -132,3 +132,7 @@ LOOP 2DROP ; + +: DELW + ' 1 - 0 SWAP C! +;