On Monday, May 8, 2023 at 8:59:47 PM UTC-4, Ben Bacarisse wrote:
I think it is. Where OFMT applies (in print) the text refers to the conversion that otherwise uses CONVFMT:
"All expression arguments shall be taken as strings, being converted if necessary; this conversion shall be as described in Expressions in
awk, with the exception that the printf format in OFMT shall be used instead of the value in CONVFMT."
and it's the referenced text that has the integer exception with CONVFMT used for other values. Using OFMT in place of CONVFMT in that text does not remove the exception.I think that's right. It also says this:
"The intent has been to specify historical practice in almost all cases."
And I think the history is that all implementations of awk have always converted
integral values using the equivalent of "%d", regardless of the CONVFMT or OFMT setting.
Regards,
Andy
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 103:00:33 |
Calls: | 6,851 |
Calls today: | 2 |
Files: | 12,355 |
Messages: | 5,415,473 |