Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
|
|
@ -1,6 +1,6 @@
|
|||
bf[program_, input_] :=
|
||||
Module[{p = Characters[program], pp = 0, m, mp = 0, bc = 0,
|
||||
instr = StringToStream[input],
|
||||
instr = StringToStream[input]},
|
||||
m[_] = 0;
|
||||
While[pp < Length@p,
|
||||
pp++;
|
||||
|
|
@ -9,7 +9,7 @@ bf[program_, input_] :=
|
|||
"<", mp--,
|
||||
"+", m[mp]++,
|
||||
"-", m[mp]--,
|
||||
".", BinaryWrite[OutputStream["stdout", 1], m[mp]],
|
||||
".", BinaryWrite["stdout", m[mp]],
|
||||
",", m[mp] = BinaryRead[instr],
|
||||
"[", If[m[mp] == 0,
|
||||
bc = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue