delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/02/06:45:31

From: "Giacomo Cau" <G DOT Cau AT gruppoina DOT it>
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 <eliz AT is DOT elta DOT co DOT il> 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



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019