From: "Giacomo Cau" Newsgroups: comp.os.msdos.djgpp Subject: Re: Gawk 3.0.3 print error? Date: 2 Feb 2000 11:43:19 GMT Organization: ina Lines: 24 Message-ID: <01bf6d72$d4059c20$09cc010a@iws0334.inadg.gruppoina.it> References: <01bf6c8d$65a899c0$09cc010a AT iws0334 DOT inadg DOT gruppoina DOT it> <389736D3 DOT 7A081734 AT is DOT elta DOT co DOT il> NNTP-Posting-Host: rm3-784.tiscalinet.it X-Trace: pegasus.tiscalinet.it 949491799 16621 62.11.130.144 (2 Feb 2000 11:43:19 GMT) X-Complaints-To: newsadmin AT tiscali DOT it NNTP-Posting-Date: 2 Feb 2000 11:43:19 GMT X-Newsreader: Microsoft Internet News 4.70.1161 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii scritto nell'articolo <389736D3 DOT 7A081734 AT is DOT elta DOT co DOT il>... > Giacomo Cau wrote: > > > > >gawk "BEGIN{OFMT=\"%012.0f\";print OFMT,1,sprintf(OFMT,1)}" > > > > %012.0f 1 000000000001 > > What seems to be the problem, exactly? I don't see anything wrong with this > result; that's what I'd expect "%012.0f" to produce. The leading zero says > to pad with zeros, and .0 says no fractional digits. > the problem is not in the "sprintf" but is in the "print 1". In fact it seems that OFMT in not used to format numbers. by