From: Phil Burk Date: Sun, 6 Sep 2020 01:25:27 +0000 (-0700) Subject: Simplify VALUE X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/146f755d23161fdc2fade78ce984d12a227baf55 Simplify VALUE Now it does not produce an IMMEDIATE word. This allows it to pass some standard tests. Fixes #20 --- 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 )