| Revision 27878 (by Whiteknight, 2008/05/28 14:44:03) |
[languages] updating all languages except Tcl and Perl6 to use ".namespace []" as per rt#48549. all tests that were passing are still passing. |
# $Id: say.pir 27878 2008-05-28 14:44:03Z Whiteknight $
=head1
say.pir -- simple implementation of a say function
=cut
.namespace []
.sub 'VISIBLE'
.param pmc args :slurpy
.local int no_newline
no_newline = 0
.local pmc iter
iter = new 'Iterator', args
iter_loop:
unless iter goto iter_end
$S0 = shift iter
$I0 = iseq $S0, '!'
if $I0 goto no_print
print $S0
goto iter_loop
no_print:
no_newline = 1
goto iter_loop
iter_end:
if no_newline goto done
print "\n"
done:
.return ()
.end
# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir: