[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: format bug
From: |
Eric Blake |
Subject: |
Re: format bug |
Date: |
Thu, 31 May 2007 13:23:28 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Daniel Richard G. on 5/31/2007 9:24 AM:
> A couple of comments on the format change:
>
> Love the gain of \NNN, \xHH et al. escape sequences. Will this include
> locale-dependent multi-byte characters with \uHHHH and \uHHHHHHHH as well?
>
> Leery of making "%c" == "%.1s". This behavior doesn't seem terribly useful.
But it would match what /bin/printf does, and nobody complained about that
being not terribly useful when it was standardized in POSIX.
>
> Also, once the transition period is over, the only way to specify a
> non-literal character will be via \NNN, \x or \u, yes? All of which require
> an octal or hex argument. What would I do if I have an eval()---whose
> result is decimal---and I want to convert the result to a character?
eval() takes a second argument - if you are computing a value, it is just
as easy to compute it in octal or hex to begin with. For example,
format(`%b', `\0'eval(computation, `8'))
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGXyCw84KuGfSFAYARAuJdAKDMe6HXK5R60nQ+N0ku2Lx9S8qAIwCeNnLS
P6Xt1qAs/P/dvHx5t4deIMU=
=ENuO
-----END PGP SIGNATURE-----