summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--dynamic.e3
-rw-r--r--interpret.e10
2 files changed, 8 insertions, 5 deletions
diff --git a/dynamic.e b/dynamic.e
index 2edcc13..773511f 100644
--- a/dynamic.e
+++ b/dynamic.e
@@ -204,6 +204,9 @@
   newline ;
 
 
+: bye 0 sys-exit ;
+
+
 
 ~ Log manipulation
 ~ ~~~~~~~~~~~~~~~~
diff --git a/interpret.e b/interpret.e
index 3e30523..5941d15 100644
--- a/interpret.e
+++ b/interpret.e
@@ -191,11 +191,11 @@
   { key dup is-space } { drop } while
 
   ~ Early exit if it's a zero byte.
-  {
-    dup 0 = { drop dropstring 0 exit } if
+  dup 0 = { drop dropstring 0 exit } if
 
-    accumulate-string
+  accumulate-string
 
+  {
     peek dup is-space { drop exit } if
     dup { drop exit } unless
     consume accumulate-string
@@ -463,7 +463,7 @@ latest @
   value@ find
 
   ~ Check whether the word was found in the dictionary.
-  dup 0 != {
+  dup {
     ~ If the word is in the dictionary, check what mode we're in, then...
     dropstring-with-result
     ~ (entry pointer)
@@ -504,7 +504,7 @@ latest @
   } if
 
   ~ If it's neither in the dictionary nor a number, just print an error.
-  s" No such word: " emitstring value@ emitstring dropstring ;
+  ." No such word: " value@ emitstring newline dropstring ;
 
 : quit r0 @ control! { interpret } forever ;