Made forth.jl compatible with julia 0.5.
authorTim Vaughan <tgvaughan@gmail.com>
Tue, 17 Jan 2017 08:27:08 +0000 (21:27 +1300)
committerTim Vaughan <tgvaughan@gmail.com>
Tue, 17 Jan 2017 08:27:08 +0000 (21:27 +1300)
README.md
REQUIRE
src/forth.jl

index 54dd58b..123f3c4 100644 (file)
--- a/README.md
+++ b/README.md
@@ -26,6 +26,9 @@ install it, you will therefore need to use the following command:
 
     julia> Pkg.clone("https://github.com/tgvaughan/forth.jl")
 
+Currently, forth.jl **requires** Julia 0.5. (Incompatabilities between 0.4 and 0.5
+mean that I cannot support both versions.)
+
 ## Usage
 
 To start the interpreter/compiler running, simply enter the following at
diff --git a/REQUIRE b/REQUIRE
index d5d6467..94237c0 100644 (file)
--- a/REQUIRE
+++ b/REQUIRE
@@ -1 +1 @@
-julia 0.4
+julia 0.5
index 81505a1..e391d00 100644 (file)
@@ -97,7 +97,7 @@ end
 
 # Handy functions for adding/retrieving strings to/from memory.
 
-getString(addr::Int64, len::Int64) = AbstractString([Char(c) for c in mem[addr:(addr+len-1)]])
+getString(addr::Int64, len::Int64) = String([Char(c) for c in mem[addr:(addr+len-1)]])
 
 function putString(str::AbstractString, addr::Int64)
     mem[addr:(addr+length(str)-1)] = [Int64(c) for c in str]
@@ -708,7 +708,7 @@ end
 
 function getKey()
     raw_mode!(true)
-    byte = readbytes(STDIN, 1)[1]
+    byte = read(STDIN, 1)[1]
     raw_mode!(false)
 
     if byte == 0x0d
@@ -750,7 +750,7 @@ function getLineFromSTDIN()
 
         if key == '\n'
             print(" ")
-            return AbstractString(line)
+            return String(line)
 
         elseif key == '\x04'
             if isempty(line)
@@ -1370,7 +1370,7 @@ function dump(startAddr::Int64; count::Int64 = 100, cellsPerLine::Int64 = 10)
             i += 1
         end
 
-        println("\t", AbstractString(chars))
+        println("\t", String(chars))
     end
 end