[PDD] Add docs for the Parrot_PMC_push_* and Parrot_PMC_pop_* functions
[parrot.git] / examples / tutorial / 21_string_ops_repeat.pir
blobc79d2fafe176dffddfba20a26e4dabc2e28d067b
1 # Copyright (C) 2007-2009, Parrot Foundation.
2 # $Id$
4 =head1 String Operations (continued)
6 PIR has a string repeat opcode, that concatenates a string with
7 itself N times.
9 =cut
11 .sub main :main
13     $S0 = "Hello "
14     $S1 = repeat $S0, 3
16     say $S1 # prints "Hello Hello Hello \n"
18 .end
20 # Local Variables:
21 #   mode: pir
22 #   fill-column: 100
23 # End:
24 # vim: expandtab shiftwidth=4 ft=pir: