testing5/bf.scala
changeset 325 ca9c1cf929fa
parent 285 bd9d142d2cd8
child 340 9eeab89d0671
--- a/testing5/bf.scala	Fri Nov 22 17:01:55 2019 +0000
+++ b/testing5/bf.scala	Tue Nov 26 01:22:36 2019 +0000
@@ -93,7 +93,7 @@
       case '+' => (pc + 1, mp, write(mem, mp, sread(mem, mp) + 1))
       case '-' => (pc + 1, mp, write(mem, mp, sread(mem, mp) - 1))
       case '.' => { print(sread(mem, mp).toChar); (pc + 1, mp, mem) }
-      case ',' => (pc + 1, mp, write(mem, mp, Console.in.read().toByte))
+      case ',' => (pc + 1, mp, write(mem, mp, scala.io.StdIn.readByte()))
       case '['  => 
 	if (sread(mem, mp) == 0) (jumpRight(prog, pc + 1, 0), mp, mem) else (pc + 1, mp, mem) 
       case ']'  =>