Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #39757] [BUG] sprintf left-justification doesn't work

1 view
Skip to first unread message

Matt Diephouse

unread,
Jul 7, 2006, 3:33:09 AM7/7/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #39757]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39757 >


mini:~/Projects/parrot mdiep$ cat test.pir
.sub main :main
$P0 = new .ResizablePMCArray
$P1 = new .Integer
$P1 = 10
$P0[0] = $P1
$P1 = new .String
$P1 = "foo"
$P0[1] = $P1
$P1 = new .String
$P1 = "bar"
$P0[2] = $P1
$S0 = sprintf "%-*s - %s\n", $P0
print $S0
end
.end

mini:~/Projects/parrot mdiep$ parrot test.pir
foo - bar
mini:~/Projects/parrot mdiep$

That should output "foo - bar" instead.

Tcl may be blocking on this soon, so takers wanted. :-)

--
Matt Diephouse

0 new messages