From: Tim Vaughan Date: Tue, 11 Jul 2017 02:25:57 +0000 (+1000) Subject: Transitioning to julia 0.6 (may be hard) X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=d3205350a0b5935ac26e154750f5916ebbeebae3;p=forth.jl.git Transitioning to julia 0.6 (may be hard) --- diff --git a/src/forth.jl b/src/forth.jl index 01b39a2..947aafb 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -501,7 +501,7 @@ end) XOR_CFA = defPrimWord("XOR", () -> begin b = popPS() a = popPS() - pushPS(a $ b) + pushPS(xor(a, b)) return NEXT end) @@ -678,7 +678,7 @@ READ_LINE_CFA = defPrimWord("READ-LINE", () -> begin addr = popPS() fh = openFiles[fid] - line = readline(fh) + line = readline(fh, chomp=false) eofFlag = endswith(line, '\n') ? 0 : -1 line = chomp(line) @@ -1127,7 +1127,7 @@ end, flags=F_IMMED) HIDDEN_CFA = defPrimWord("HIDDEN", () -> begin lenAndFlagsAddr = mem[mem[CURRENT]+1] + 1 - mem[lenAndFlagsAddr] = mem[lenAndFlagsAddr] $ F_HIDDEN + mem[lenAndFlagsAddr] = xor(mem[lenAndFlagsAddr], F_HIDDEN) return NEXT end) @@ -1147,7 +1147,7 @@ SEMICOLON_CFA = defWord(";", IMMEDIATE_CFA = defPrimWord("IMMEDIATE", () -> begin lenAndFlagsAddr = mem[mem[CURRENT]+1] + 1 - mem[lenAndFlagsAddr] = mem[lenAndFlagsAddr] $ F_IMMED + mem[lenAndFlagsAddr] = xor(mem[lenAndFlagsAddr], F_IMMED) return NEXT end, flags=F_IMMED) diff --git a/src/lib_8_vocab.4th b/src/lib_8_vocab.4th index 22d98b5..8ad875f 100644 --- a/src/lib_8_vocab.4th +++ b/src/lib_8_vocab.4th @@ -47,7 +47,6 @@ 2DROP ( len addr -- ) ; - \ Create new vocabulary : VOCABULARY create 0 ,