Execute HQ9+: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl 6}}: modernize, combine sections)
Line 915: Line 915:


=={{header|Perl 6}}==
=={{header|Perl 6}}==
{{works with|rakudo|2015-09-10}}
The spec is kind of vague about how to do error handling... and whether white space is significant... and how the accumulator should be accessed... and pretty much everything else too.
The spec is kind of vague about how to do error handling... and whether white space is significant... and how the accumulator should be accessed... and pretty much everything else too.


Line 946: Line 947:
}
}
}
}
}
}</lang>


Feed it a command string:
# Feed it a command string:

<lang perl6>my $hq9 = HQ9Interpreter.new;
my $hq9 = HQ9Interpreter.new;
$hq9.run("hHq+++Qq");
$hq9.run("hHq+++Qq");
say;
say '';
$hq9.run("Jhq.k+hQ");</lang>
$hq9.run("Jhq.k+hQ");</lang>