I had a perfectly good reason for doing it this way…
declare idfunction hexhex () { printf -v id %06X 0x$1 }