Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 715 Bytes

sample_107.md

File metadata and controls

39 lines (25 loc) · 715 Bytes

Home

Converting a hexadecimal string to an integer

Before you begin:

Check reverse example Converting an integer value to a hexadecimal string.


Code:

#DEFINE STIF_DEFAULT               0
#DEFINE STIF_SUPPORT_HEX           1

DECLARE SHORT StrToIntEx IN Shlwapi;
	STRING    pszString,;
	INTEGER   dwFlags,;
	INTEGER @ pllRet

LOCAL lcHex, lnRet

lcHex = "0x800"
lnRet = 0

= StrToIntEx (lcHex, STIF_SUPPORT_HEX, @lnRet)
? lnRet  

Listed functions:

StrToIntEx

Comment:

STIF_DEFAULT mode supports regular decimal notation.