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 实现无标题栏但有边框的窗口

Delphi开发获取文件md5值

Delphi 禁用tedit右键菜单及复制粘贴

Delphi判断驱动器类型

Delphi禁止在android上重复按下按钮

Delphi指针和字符串

Delphi 验证ip地址

Delphi应用程序 paramstr()带有参数

Delphi android实例-退出程序(xe8+小米2)

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



打赏

取消

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

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

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

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

评论

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