
25 Jun
2021
25 Jun
'21
2:57 p.m.
On Wed, Jun 23, 2021 at 08:08:50AM +0200, Wolfgang Denk wrote:
Dear Simon,
In message CAPnjgZ13=2SCsZC1Y+m-HZOiBhpGiEFe2dRWwK9sAZHutgaO7Q@mail.gmail.com you wrote:
0m123 ? ('m' for deciMal).
Perhaps 0d123? Though I would prefer to remove many of the implicit assumptions of hex input.
Right, we can't use 'd' because it is valid hex.
I believe hex is the right default. We just need an easy way to use decimal.
Maybe we should make this more general and support an even wirder range of formats? Instead of just converting to decimal, we could pass a format string for sprintf() ?
Like:
# setexpr foo fmt %d $value
I like this idea as well.
--
Tom