BYE now prints nothing when input stream is file.
authorTim Vaughan <tgvaughan@gmail.com>
Sat, 15 Oct 2016 00:45:35 +0000 (13:45 +1300)
committerTim Vaughan <tgvaughan@gmail.com>
Sat, 15 Oct 2016 00:45:35 +0000 (13:45 +1300)
src/forth.jl

index 02f74af..81505a1 100644 (file)
@@ -1233,7 +1233,9 @@ ABORT_CFA = defWord("ABORT",
     [CLOSE_FILES_CFA, DROP_CFA, PSP0_CFA, PSPSTORE_CFA, QUIT_CFA])
 
 BYE_CFA = defPrimWord("BYE", () -> begin
-    println("\nBye!")
+    if mem[SOURCE_ID_VAR] == 0
+        println("\nBye!")
+    end
     return 0
 end)