I'm not sure if this is a bug, but

printf "%c" 49

prints

4

instead of what I'd expect, which is

1

(ASCII 49)

Taken literally, I suppose this could be construed as "converting the
argument to the correct type", since the argument 49 is really a string,
but is seems a bit perverse, and it's certainly not what a C programmer
(like me!) would expect by analogy with

printf("%c", 49);

This happens with /usr/bin/printf, and also with bash printf on a number
of systems which made me wonder whether I'm just being stupid...

-- 
http://www.mupsych.org/~rrt/ | God is the name of our ignorance (Grayling)


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to