BYTETOHEX (convert a BYTE to Hexadecimal)

Top  Previous  Next

 

BYTETOHEX( number, flag )

BYTETOHEX

Convert a BYTE value to its Hexadecimal equivalent.

number

A BYTE variable or constant

flag

A BYTE used to designate a lower or upper case HEX symbol (A,B,C,D,E)

 

BYTETOHEX is used to convert a number to its Hexadecimal equivalent. If the flag variable is non-zero, any non-numeric Hexadecimal symbols are returned in lowercase. If zero (default), the non-numeric digits are returned in uppercase.

To add this function to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program:

INCLUDE('CWUTIL.INC'),ONCE

Return Data Type:     STRING

Example:

BYTETOHEX(255,0)    !returns 'FF'

BYTETOHEX(255,1)    !returns 'ff'

See Also:

SHORTTOHEX

LONGTOHEX