[Top][All Lists]

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

Re: [bug-gawk] Invalid result when converting to hex literal

From: Nelson H. F. Beebe
Subject: Re: [bug-gawk] Invalid result when converting to hex literal
Date: Wed, 21 Mar 2018 07:28:48 -0600

Thanks, Arnold, for the explanation of awk's conversion of the token
12345foolish as a numeric value, 12345, followed by the string value
of the variable foolish; I had expected that whitespace would have
been required in the concatenation operation, but it appears not to be
the case.  I use concatenation a lot in my own awk programming, but
always with intervening space.

Should you decide to add support for the %a format in gawk, you are
correct to be concerned about possible lack of support for accurate
base conversions in older C libraries.

A solution for IEEE 754 systems (and thus, not applicable to VAX VMS,
or IBM S/390 and zSeries mainframes) are the conversion routines
written by the well-known numerical analyst David M. Gay, available at


They have been tested on many different systems and carry license
statements that I believe should be acceptable for inclusion in GNU

- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -

reply via email to

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