🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #828

Re: printf zero-pads strings?

#828
From: Doug Gwyn
Date: Mon, 23 Oct 1989 15:20
13 lines
1089 bytes
In article <7279@sdcsvax.UCSD.Edu> williams@beowulf.UCSD.EDU (Paul Williamson) writes:
>Has the definition of printf changed since early drafts of the ANSI spec?

Yes, at one point the specs that had been derived from AT&T UNIX
System V specs were replaced with wording supplied by Alan Beale.
When we subsequently found unintended changes in behavior implied
in that version, additional revision occurred.  So far as I can
tell, the final fprintf() spec is exactly what we do intend.

>K&R2 and several other compilers give "    x", claiming that zero-padding
>applies only to numeric values.

And that is what we intend.
Technical Details
Message-ID: <11390@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!wuarchive!udel!haven!adm!smoke!gwyn
References: <7279@sdcsvax.UCSD.Edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!wuarchive!udel!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: printf zero-pads strings?
Message-ID: <11390@smoke.BRL.MIL>
Date: 23 Oct 89 15:20:50 GMT
References: <7279@sdcsvax.UCSD.Edu>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 13