Execute HQ9+/Ruby: Difference between revisions
m
Fixed syntax highlighting.
m (moved RCHQ9+/Ruby to Execute HQ9+/Ruby) |
m (Fixed syntax highlighting.) |
||
Line 1:
{{implementation|HQ9+}}{{collection|RCHQ9+}}
This [[Ruby]] program implements an [[HQ9+]] interpreter.
<
Dispatch = Hash.new(:unknown).merge({
'h' => :hello,
Line 45:
hq9 = HQ9plus.new(:program => '+qhp;+9Q')
hq9.run
puts hq9.accumulator</
Output:
|