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 httpserver 使用方法

进程防杀Delphi版(dll部分)

Delphi 获取网页代码单元

Delphi取ajax网页内容

Delphi webbrowser 去除滚动条和边框

Delphi win10系统已管理员的权限运行应用程序

Delphi10.3读取json数据

Delphi tstringlist stringlist的特殊用法

Delphi adoconnection1连接mssql数据库方法

Delphi 获取网页源代码的最简单办法

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



打赏

取消

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

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

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

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

评论

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