Execute HQ9+: Difference between revisions

Added Arturo implementation
(Added Quackery.)
(Added Arturo implementation)
Line 362:
270 NEXT B
280 NEXT I</lang>
 
=={{header|Arturo}}==
 
<lang rebol>hq9: function [source][
acc: 0
loop split source 'ch [
case [(lower ch)=]
when? ["h"]-> print "Hello, world!"
when? ["q"]-> print source
when? ["9"]-> print "99 bottles here ..."
when? ["+"]-> acc: acc+1
else []
 
]
return acc
]
 
acc: hq9 {+qhp;+9Q}
print ["accumulator:" acc]</lang>
 
{{out}}
 
<pre>+qhp;+9Q
Hello, world!
99 bottles here ...
+qhp;+9Q
accumulator: 2</pre>
 
=={{header|AutoHotkey}}==
1,532

edits