[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Invalid result when converting to hex literal
From: |
arnold |
Subject: |
Re: [bug-gawk] Invalid result when converting to hex literal |
Date: |
Wed, 21 Mar 2018 01:47:10 -0600 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
Steven Penny <address@hidden> wrote:
> On Tue, Mar 20, 2018 at 2:50 PM wrote:
> > POSIX doesn't require awk to support %a. If you think it does,
> > please cite chapter and verse.
>
> I did that a year ago already, but I will do it again:
I don't remember this, but that doesn't matter.
> > The printf statement shall produce output based on a notation similar to
> > the File Format Notation used to describe file formats in this volume of
> > POSIX.1-2008 (see XBD File Format Notation).
>
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html#tag_20_06_13_10
>
> > The floating-point number argument representing a floating-point number
> > shall be converted in the style "[-]0xh.hhhhp??d" [...]
>
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap05.html
Harumph. I think the standard used to be more explicit about which
specifiers were required in awk and which not, but I may be wrong.
So indeed, basic language lawyering leads us to undertstand that POSIX
wants %a in awk.
At the moment, I don't think any awk implements this. Additionally,
it is problematic to do so on some older-but-still-supported platforms,
since this requires support in the underlying C library that may
be missing.
I will have to think about this.
Thanks,
Arnold
- [bug-gawk] Invalid result when converting to hex literal, Steven Penny, 2018/03/20
- Re: [bug-gawk] Invalid result when converting to hex literal, arnold, 2018/03/20
- Re: [bug-gawk] Invalid result when converting to hex literal, arnold, 2018/03/20
- Re: [bug-gawk] Invalid result when converting to hex literal, Nelson H. F. Beebe, 2018/03/20
- Re: [bug-gawk] Invalid result when converting to hex literal, Steven Penny, 2018/03/20
- Re: [bug-gawk] Invalid result when converting to hex literal, arnold, 2018/03/20
- Re: [bug-gawk] Invalid result when converting to hex literal, Steven Penny, 2018/03/20
- Re: [bug-gawk] Invalid result when converting to hex literal,
arnold <=
- Re: [bug-gawk] Invalid result when converting to hex literal, Nelson H. F. Beebe, 2018/03/21
- Re: [bug-gawk] Invalid result when converting to hex literal, arnold, 2018/03/22
- Re: [bug-gawk] Invalid result when converting to hex literal, Arnold Robbins, 2018/03/22
- Re: [bug-gawk] Invalid result when converting to hex literal, arnold, 2018/03/21