
Dear "David Collier",
In message <memo.20091026132928.2092l@postmaster+dexdyne.com.cix.co.uk> you wrote:
I concede I can indeed do the one thing I need here by using decimal values with hex arithmetic, and it will give the right answer.
though it is truly horrible coding :-)
You misunderstand. You misunderstand completly.
Exstracting the last N digits from a number using '%' is independent of the number base.
I can see situations where I'd want to do something like "add one to the last serial number I used" where decimal arithmetic would be needed.
Not for the addition itself :-)
For myself, I don't see any reason why an arithmetic command shouldn't be a special case ( in having the option to work in various bases ), it's doing a special job.
What probably would make sense and could be helpful for more advanced scripting is something like a sprintf command that would allow you to output (and store the result in a new environment variable) the content of one or more environment variables in a specific format, plus regexp support for setexpr.
Volunteers wellcome.
Best regards,
Wolfgang Denk