From: Tim Vaughan Date: Sat, 15 Oct 2016 00:45:35 +0000 (+1300) Subject: BYE now prints nothing when input stream is file. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=forth.jl.git;a=commitdiff_plain;h=117c25e35466b8604f9448ea1c1cfba5ecf728f2;hp=74030e7ce7cbe674ac71767cff6e9c3f3564c3b0 BYE now prints nothing when input stream is file. --- diff --git a/src/forth.jl b/src/forth.jl index 02f74af..81505a1 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -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)