bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf/sprintf-modifier "0" not working in gawk 3.1.8 under Cygwin


From: Aharon Robbins
Subject: Re: printf/sprintf-modifier "0" not working in gawk 3.1.8 under Cygwin
Date: Tue, 06 Jul 2010 06:42:21 +0300
User-agent: Heirloom mailx 12.4 7/29/08

Hi. I think I answered this.  This is a deliberate change. You can
use %0d to get the behavior you want, which is more logical anyway.

Thanks,

Arnold

> Subject: printf/sprintf-modifier "0" not working in gawk 3.1.8 under Cygwin
> To: address@hidden
> From: address@hidden
> Date: Mon, 17 May 2010 11:55:25 +0200
>
> Hi,
>
> I recently ugraded to gawk 3.1.8. and stumbled upon a different behaviour
> to gawk 3.1.7.
> To reproduce, execute the following program:
> BEGIN {
>     number = 25
>     padded_number = sprintf("%04s", number)
>     print(padded_number)
>     printf("%04s", 25)
> }
>
> With 3.1.7 I get the expected result:
> 0025
> 0025
>
> With 3.1.8 I get:
>   25
>   25
>
> Best regards,
>
> Christian
>
>
> Vistec Electron Beam GmbH, GmbH mit Sitz in Jena
> Amtsgericht Jena HRB 205835, USt-IdNr.: DE 81 200 7851
> Geschaeftsfuehrer: Martyn P. Ansell, Wolfgang Dorl
> Tel.: +493641 6519 00, Fax: +493641 6519 22



reply via email to

[Prev in Thread] Current Thread [Next in Thread]