LONGTOHEX (convert an unsigned LONG to Hexadecimal)

Top  Previous  Next

 

LONGTOHEX( number, flag )

LONGTOHEX

Convert a ULONG value to its Hexadecimal equivalent.

number

A ULONG variable or constant

flag

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

 

LONGTOHEX 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 support for this utility 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:

LONGTOHEX(32000000,0)    !returns 1E84800

LONGTOHEX(32000000,1)    !returns 1e84800

See Also:

BYTETOHEX

SHORTTOHEX