tagged release 0.6.4
[parrot.git] / languages / tcl / runtime / builtin / format.pir
blobf62b607eb712249894f4135636a1bb30c90c5056
1 ###
2 # [format]
5 # format string arg arg arg
7 .HLL 'Tcl', 'tcl_group'
8 .namespace []
10 .sub '&format'
11   .param pmc argv :slurpy
13   .local int argc
14   argc = argv
15   if argc == 0 goto noargs
17   .local string format
19   # pull off the format string.
20   shift format, argv
22   $S0 = sprintf format, argv
24   .return($S0)
26 noargs:
27   tcl_error 'wrong # args: should be "format formatString ?arg arg ...?"'
28 .end
30 # Local Variables:
31 #   mode: pir
32 #   fill-column: 100
33 # End:
34 # vim: expandtab shiftwidth=4 ft=pir: