project BLF > class Win32Lib > method ConvertIntegerToHex
function returns character
Description
Converts an integer to its hexadecimal representation.
-> Only for 0..255 integer values
Parameters
iiIntValue | input | integer | Integer value to be converted to hexadecimal representation |
Internal usage
BLF
program code (program1/win32lib.p)
ASSIGN viValue1 = TRUNCATE(iiIntValue / 16, 0)
viValue2 = iiIntValue - (viValue1 * 16).
/* i is negative if a byte of the UUID is empty */
IF viValue1 < 1 THEN ASSIGN viValue1 = 0.
IF viValue2 < 1 THEN ASSIGN viValue2 = 0.
RETURN SUBSTR(vcHex, viValue1 + 1, 1,"character":U)
+ SUBSTR(vcHex, viValue2 + 1, 1,"character":U).