BYE now prints nothing when input stream is file.
[forth.jl.git] / 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)