Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 689 Bytes

sample_106.md

File metadata and controls

33 lines (24 loc) · 689 Bytes

主页

将小数字符串转换为整数

翻译:xinjie 2021.06.16

代码:

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)  

函数列表

StrToInt

备注:

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