Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: "%02d" vs "%.2d" Message-ID: <15690@mimsy.UUCP> Date: 29 Jan 89 03:44:06 GMT References: <104@rpi.edu> <198@broadway.UUCP> <6951@june.cs.washington.edu> <13368@ncoast.ORG> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 12 In article <13368@ncoast.ORG> allbery@ncoast.ORG (Brandon S. Allbery) writes: >One other reason as well: it's not possible to get zero padding when using >variable width fields (%*d) under the old scheme. printf("%0*d", width, value) works fine. (`Note that 0 is a flag, not a field width'....) (Of course, there may be any number of implementations that got this wrong.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris