The D2C function returns a character string which is a binary (hexadecimal) representation of a decimal number.
Portability note: the character encodings can vary in different machine environments.
result = D2C( number [, length ] ) |
Examples:
say D2C( 7 ) -- shows the character equivalent of '07'x say D2C( 129 ) -- shows the character equivalent of '81'x say D2C( 129, 2 ) -- shows the character equivalent of '0081'x say D2C( -127, 1 ) -- shows the character equivalent of '81'x say D2C( -1, 4 ) -- shows the character equivalent of 'FFFFFFFF'x |