Delphi 试试带参数的 Exit
2022-12-31 16:24:29 作者:admin
本文整理自网络,侵删。
试试带参数的 Exitunit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); end;
var Form1: TForm1;
implementation
{$R *.dfm}
function fun(str: string): string;begin if str = '' then Exit('空'); {Delphi 2009 支持} Result := str + str;end;
procedure TForm1.Button1Click(Sender: TObject);var s: string;begin s := fun('ABC'); ShowMessage(s); {ABCABC}
s := fun(''); ShowMessage(s); {空}end;
end.
相关阅读 >>
Delphi 如何使用sendmessage发送后台组合键消息(ctrl+xxx)
Delphi中多线程分析详解
Delphi源码获取网络图片缓存的地址
Delphi 校验手机号及身份证号
Delphi窗口最小化和还原事件捕获
Delphi mscomm1自动获取串口
Delphi 使用openjdk进行Delphi android开发
Delphi tlistview(tlistbox+图标显示)
推荐一套免费跨平台的Delphi 哈希及加密算法库
Delphi [函数] unicode 检查字符串是否含中文字
更多相关阅读请进入《Delphi》频道 >>
猜你喜欢
联络方式:
400-123-789
邮箱:xiachao@163.com
Q Q:12345678
微信公众号
微信二维码