Execute Brain****: Difference between revisions
m
→{{header|Sidef}}: minor code fix
m (→{{header|Sidef}}: modified code to work with Sidef 2.10) |
m (→{{header|Sidef}}: minor code fix) |
||
Line 1,927:
func get_input {
static input_buffer =
input_buffer.len || (input_buffer = ((STDIN.readline \\ return eof_val).chomp.chars.map{.ord}));
input_buffer.shift
}
Line 1,948:
'>' => { ++cell },
'<' => { --cell },
'+' => { ++tape[cell]
'-' => { --tape[cell]
'.' => { tape[cell].chr.print },
',' => { tape[cell] = get_input() },
Line 1,956:
);
STDOUT.autoflush(1);
code = ARGF.slurp.
var code_len = code.len;
|