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 adoquery的post和updatebatch

Delphi 获取cpu使用单元文件

Delphi双击tmemo选择光标所在行

Delphi concat 字符串函数

Delphi用ado操作数据库完整示例

文件占坑对付云安全

Delphi 中 16 进制转换为 10 进制

Delphi 用wininet 单元实现 post提交数据

Delphi连接access提示密码无效解决一例

Delphi 最全_日期格式_dateutils时间单元说明

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



打赏

取消

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

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

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

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

评论

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