From 146f755d23161fdc2fade78ce984d12a227baf55 Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Sat, 5 Sep 2020 18:25:27 -0700 Subject: [PATCH] Simplify VALUE Now it does not produce an IMMEDIATE word. This allows it to pass some standard tests. Fixes #20 --- fth/ansilocs.fth | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/fth/ansilocs.fth b/fth/ansilocs.fth index 3423bfc..923eef2 100644 --- a/fth/ansilocs.fth +++ b/fth/ansilocs.fth @@ -139,19 +139,11 @@ if.forgotten lv.term THEN ; - : VALUE CREATE ( n ) , - immediate DOES> - state @ - IF - [compile] aliteral - compile @ - ELSE - @ - THEN + @ ; : TO ( val -- ) @@ -161,7 +153,7 @@ if.forgotten lv.term lv.compile.store ELSE find - 1 = 0= abort" TO or -> before non-local or non-value" + 0= abort" not found" >body \ point to data state @ IF \ compiling ( -- pfa ) @@ -183,7 +175,7 @@ if.forgotten lv.term [compile] literal compile (local+!) ELSE find - 1 = 0= abort" +-> before non-local or non-value" + 0= abort" not found" >body \ point to data state @ IF \ compiling ( -- pfa ) -- 2.20.1