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

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

gawk printf format problem with negative numbers


From: Shaffer, Kenneth
Subject: gawk printf format problem with negative numbers
Date: Tue, 28 Oct 2003 11:53:35 -0500

I expected the output of a negative 1234 in hex to look like 0xfffffb2e:
 
> echo |gawk '{n = -1234; printf("0x%x\n",n+0)}'
0x-1234
> gawk --version
GNU Awk 3.1.3
 
running under cygwin for the PC.
 
--
Ken Shaffer
Staff Software Engineer
770-236-3421
address@hidden
 
 
 


- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.

reply via email to

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