Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
07:50 • Ticket [219021ffff] format "%05s" 12 returns 12 padded on left with bl... artifact: ecae4563f9 user: dgp
2000-10-26
08:33 • Closed ticket [219021ffff]. artifact: bfd0335fc7 user: welch
01:09 • New ticket [219021ffff]. artifact: 2fab18d588 user: nobody

format "%05s" 12 returns 12 padded on left with blanks; prev

Closed / Fixed219021ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:09:33
OriginalBugID: 3992 Bug
Version: 8.2
SubmitDate: '2000-01-10'
LastModified: '2000-01-10'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: HP-UX
OSVersion: HP-UX B.10.20
Machine: HP 9000/892
FixedDate: '2000-01-10'
FixedInVersion: 8.2.3
ClosedDate: '2000-10-25'


Name:
Paul Takemura

Extensions:
protclsh82, Oratcl

Comments:
Perhaps the format command is now working with the correct behavior.  I can certainly use "%05d" as a format specifier, but this assumes that I'm formatting an integer (which may not always be the case).

ReproducibleScript:
format "%05s" 12

ObservedBehavior:
returns bbb12 (where 'b' represents blank)

DesiredBehavior:
In the past, the command has returned 00012



This was already fixed in an 8.2 patch release (for sure 8.2.3),
but it should be noted that the user is relying upon "undefined"
behavior (according to ANSI spec), so we just made it work like
8.0, but this behavior is still undoc'ed. 
-- 01/10/2000 hobbs
welch Closed ticket [219021ffff]. [History diff]2000-10-26 08:33:09
dgp Ticket [219021ffff]: 4 changes [History diff]2001-04-05 07:50:42
Log in (anonymous is fine) to add a comment.