reftohex converts argument expr to a character value containing its hexadecimal equivalent. expr must return a REF.