Execute Brain****/Tcl: Difference between revisions

m
Fixed syntax highlighting.
m (→‎Interpreter Implementation: formatting niceness)
m (Fixed syntax highlighting.)
 
(4 intermediate revisions by 2 users not shown)
Line 1:
{{implementation|Brainf***}}{{collection|RCBF}}[[Categoryimplementation of task:Tcl:RCBF| ]]
This [[Tcl]] [[Brainfuck]] interpreter is derived from code on [http://wiki.tcl.tk/9490 The Tcler's Wiki], and is written to be short but not particularly clear.
 
To use it, save it to a file (e.g., called “bf.tcl”) and run that against <tt>tclsh</tt> with either the name of the file containing the BF program or just input the program on stdin; the program will only begin execution after you do end-of-file (however that's done on your OS). For example:
tclsh8.5 bf.tcl helloWorld.bf
<br clear=all>
===Interpreter Implementation===
{{works with|Tcl|8.5}}
<langsyntaxhighlight lang="tcl">package require Tcl 8.5
fconfigure stdout -buffering none
fconfigure stdin -buffering none
Line 56:
}
}
}</langsyntaxhighlight>
9,476

edits