diff options
author | john haque <j.eh@mchsi.com> | 2012-04-17 13:00:13 -0500 |
---|---|---|
committer | john haque <j.eh@mchsi.com> | 2012-04-17 13:00:13 -0500 |
commit | b1062311a3caab9ec89c0f104bd9b4334174f23c (patch) | |
tree | 08a64713888026fb80fd80360343a51aebd8a593 /test/printfbad3.awk | |
parent | e729adf120f279fd65578a410ca8d2d93a56f0f0 (diff) | |
parent | f0345a29c71a3215adaa0e2fdfefc0c439ea6561 (diff) | |
download | egawk-b1062311a3caab9ec89c0f104bd9b4334174f23c.tar.gz egawk-b1062311a3caab9ec89c0f104bd9b4334174f23c.tar.bz2 egawk-b1062311a3caab9ec89c0f104bd9b4334174f23c.zip |
Merge branch 'master' into gawk_mpfr.
Diffstat (limited to 'test/printfbad3.awk')
-rw-r--r-- | test/printfbad3.awk | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/printfbad3.awk b/test/printfbad3.awk new file mode 100644 index 00000000..1cabdd76 --- /dev/null +++ b/test/printfbad3.awk @@ -0,0 +1,22 @@ +# Date: Wed, 14 Mar 2012 08:10:48 -0500 +# From: John Haque <j.eh@mchsi.com> +# To: arnold@skeeve.com +# Subject: gawk printf format bug +# +# Hi. +# +# I think this is a bug: +# +# $ gawk 'BEGIN { printf("%.0x%#x%#x\n", 0, 167, 167)}' +# 570xa7 +# +# It should print 0xa70xa7. +# +# The solution is to initialize base to 0 in the beginning +# of the while loop along with other stuff (format_tree). +# +# Thanks. +# +# John + +BEGIN { printf(">>%.0x<< >>%#x<< >>%#x<<\n", 0, 167, 167) } |