delphi 子界判断的举例


本文整理自网络,侵删。

 unit Unit1; 
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
var
i:integer;
procedure TForm1.Button1Click(Sender: TObject);
begin
i:=9;
if i in [1..7] then //子界表达式
showmessage('i<=7')
else
showmessage('9不在这个子界里面');
end;
end.

相关阅读 >>

Delphi jpg和bitmap互转转换的方法

Delphi adoconnection连接 sqlserver

Delphi 时间年月日,星期

Delphi穿墙自启动下载者4.0

Delphi firedac 获取mysql 数据库databases 列表

Delphi android 启动卡死处理方法

Delphi xe将图标和图像添加为资源

Delphi form的borderstyle属性

Delphi 判断系统服务是否运行

Delphi取整函数

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



打赏

取消

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

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

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

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

评论

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