This function casts any number to an integer, and returns it in a hexadecimal representation. Floating point numbers are truncated.
Gamma> hex (12);
0xc
Gamma> hex (12.9341);
0xc
Gamma> hex (0b111011);
0x3b
Gamma> hex ('r');
0x72
Gamma>