Fixed bug in CODE.
authorTim Vaughan <tgvaughan@gmail.com>
Sat, 13 Aug 2016 10:29:49 +0000 (22:29 +1200)
committerTim Vaughan <tgvaughan@gmail.com>
Sat, 13 Aug 2016 10:29:49 +0000 (22:29 +1200)
src/forth.jl

index 51714f4..259d0a2 100644 (file)
@@ -1038,8 +1038,10 @@ CODE_CFA = defPrimWord("CODE", () -> begin
     exprString = "() -> begin\n"
     while true
         if mem[TOIN] >= mem[NUMTIB]
-            println()
             exprString = string(exprString, "\n")
+            if currentSource() == STDIN
+                println()
+            end
 
             pushPS(TIB)
             pushPS(160)