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 用 gdi+ 给图片添加花边的例子

Delphi 获取系统进程列表和进程所在路径

Delphi什么是thttpclient?

Delphi 执行一个外部程序,当外部程序结束后言主程序立即响应

Delphi获取计算机的工作组信息和获取工作组中的计算机名称

Delphixe4 版本中,已针对移动平台 引入了 arc 模型

Delphi 控制n个字符间距空格

Delphi win10系统通知 notificationcenter1 基本用法

在rad studio Delphi或c++安卓应用中使用自定义java库

Delphi实现ftp上传与下载

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



打赏

取消

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

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

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

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

评论

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

    正在狠努力加载,请稍候...