Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 667 Bytes

File metadata and controls

32 lines (23 loc) · 667 Bytes

Home

Converting a decimal string to an integer

Code:

DECLARE INTEGER StrToInt IN Shlwapi STRING lpSrc
DECLARE INTEGER StrToLong IN Shlwapi STRING lpSrc
	
= _show("0")
= _show("1")
= _show("abc")
= _show("54")
= _show("0x100")
= _show("2001")
= _show("2 * 3")
= _show("3.14")

PROCEDURE _show(cSrc)
	? cSrc, StrToInt(cSrc), VAL(cSrc)  

Listed functions:

StrToInt

Comment:

Native TryParse in C# works a few time faster than the StrToIntEx. But the latter"s flags are less complex that the NumberStyles flags.