https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html
(The Open Group Base Specifications Issue 8 / IEEE Std 1003.1-2024)
says:

  A numeric value that is exactly equal to the value of an integer
  (see 1.1.2 Concepts Derived from the ISO C Standard) shall be
  converted to a string by the equivalent of a call to the sprintf
  function (see String Functions) with the string "%d" as the fmt
  argument and the numeric value being converted as the first and
  only expr argument.

But %d implies that the type of the integer is int. So, what if the
numeric value does not fit in an int?

Also, 1.1.2 Concepts Derived from the ISO C Standard[*] says:

  Integer variables and constants, including the values of operands
  and option-arguments, used by the standard utilities listed in this
  volume of POSIX.1-2024 shall be implemented as equivalent to the
  ISO C standard "signed long" data type;

which contradicts the use of %d.

[*] 
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap01.html#tag_18_01_02

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to