delphi Integer.tryParse


本文整理自网络,侵删。

 
会返回异常

Integer.Parse(string)

 

不会返回异常

Integer.tryParse('12',i);
 

结果:true 12

Integer.tryParse('12a',i);

结果:false 12

Integer.tryParse('a12',i);

结果:false 0

Integer.tryParse('1a2',i);

结果:false 1
――――――――――――――――

原文链接:https://blog.csdn.net/ozhy111/article/details/81942924

相关阅读 >>

Delphi 让窗口一直置顶,并且焦点也不移出

Delphi几个进制相关的代码(hextoint、hextoasc)

Delphi产生不重复随机数的算法

Delphi tanimate组件

Delphi 中 findwindow 和 findwindowex 的语法和用法

Delphi vclzip压缩文件夹

Delphi firemonkey处理图形的方式与vcl处理图形的方式大不相同

Delphi2010新功能:tdirectory.getfiles 支持通配符

Delphi 中使用dialog api

Delphi 不管什么日期格式转换都不会错了

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...