User Tools

Site Tools


shorttohex_convert_an_unsigned_short_to_hexadecimal_.htm
Navigation:  Advanced Topics > Clarion Language Utilities >====== SHORTTOHEX (convert an unsigned SHORT to Hexadecimal) ====== Previous pageReturn to chapter overviewNext page

SHORTTOHEX( number, flag )

blk2blue.jpg

SHORTTOHEX Convert a USHORT value to its Hexadecimal equivalent.
number A USHORT variable or constant
flag A BYTE used to designate a lower or upper case HEX symbol (A,B,C,D,E)

SHORTTOHEX 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:

SHORTTOHEX(64000,0)  !returns 'FA00'

SHORTTOHEX(64000,1)  !returns 'fa00'

See Also:

BYTETOHEX LONGTOHEX

shorttohex_convert_an_unsigned_short_to_hexadecimal_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1