From the bash manpage:
typeset [-afFirtx] [-p] [name[=value]]
What I'm trying to do is add two values in hexadecimal and have the resulting number display in hexadecimal. What I get is the result displayed in decimal. For instance:
a=0x10
b=0x30
((c=a+b))
echo $c
...displays 64. The arithmatic is correct, but the format should be 0x40. I tried using typeset -i16 c, but apparently, the option -i doesn't accept parameters in Darwin, so I get this error:
-bash: typeset: -1: invalid option
typeset: usage: typeset [-afFirtx] [-p] name[=value] ...
Can anyone help the newbie with a different solution? How can I get the result to display in hexadecimal format?