Hi,
Steffen Schuler wrote:
This bugreport is rather useless:
1.) The contents of /tmp/p is missing. (It can't be the empty file.)
Some copy and paste error.
$cat /tmp/p
0x111
0x112
0x222
2.) The sample [1] below from the bug report only proves that gawk works
correctly.
When interpreting hexadecimal constants in the source code, these
constants
must be prefixed by 0x.
And that's the problem. /tmp/p got prefixed with 0x, but it doesn't work.
Hexadecimal strings can be translated to internal numbers with
strtonum(str)
passing strtonum give the correct output [2].
But that make mawk fails.
3.) The word A in the source code can't be a hexadecimal constant, because
of the missing prefix 0x. It is simply a variable.
Thanks
Matthieu
[2]
$cat /tmp/p | gawk '{printf "rr " strtonum($1)-A "\n";A=strtonum($1) }'
rr 273
rr 1
rr 272
0x111
0x112
0x222