delphi TryStrToInt字符转换成整数


本文整理自网络,侵删。

 procedure TForm1.Button1Click(Sender: TObject);
var
s : string;
i : integer;
begin
s := edit1.Text;
if not TryStrToInt(s, i) then
begin
ShowMessage('转换失败!');
end else
begin
ShowMessage('转换成功,结果为:' + inttostr(i));
end;

end;

相关阅读 >>

Delphixe ansi字符串utf-8编码判断

Delphi mscomm 比较完整的用法例子

Delphi html转义

Delphi 下载网页

Delphi 取得开机时间 开机时间总长度(可精确到秒,分钟等)

Delphi tms web core 判断是否包含汉字

Delphi 把pf8bit位图变换成pf24bit位图

改写个Delphi 版 lz前辈的openprocess

Delphi分别连接ms sqlserver、oracle和access数据库的连接字符串

Delphi word转pdf两种方法

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



打赏

取消

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

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

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

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

评论

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

    暂无评论...