• Delphi集合增删的另一种操作


    D7

     1 unit Unit1;
     2 
     3 interface
     4 
     5 uses
     6   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
     7   Dialogs, StdCtrls;
     8 
     9 type
    10   TForm1 = class(TForm)
    11     Button1: TButton;
    12     Button2: TButton;
    13     Button3: TButton;
    14     procedure Button1Click(Sender: TObject);
    15     procedure Button2Click(Sender: TObject);
    16     procedure Button3Click(Sender: TObject);
    17   private
    18     { Private declarations }
    19   public
    20     { Public declarations }
    21   end;
    22   TMyset001=set of (ss,aa,mm,tt);
    23 var
    24   Form1: TForm1;
    25   Set01:TMyset001;
    26 implementation
    27 
    28 {$R *.dfm}
    29 
    30 procedure TForm1.Button1Click(Sender: TObject);
    31 begin
    32   Include(Set01,aa);
    33 end;
    34 
    35 procedure TForm1.Button2Click(Sender: TObject);
    36 begin
    37   Include(Set01,ss);
    38   
    39 end;
    40 
    41 procedure TForm1.Button3Click(Sender: TObject);
    42 begin
    43   Exclude(Set01,ss);
    44   Exclude(Set01,aa);
    45   Exclude(Set01,ss);
    46   if Set01=[] then
    47   begin
    48     //
    49   end;
    50 end;
    51 
    52 end.
  • 相关阅读:
    netty ByteToMessageDecoder 分析
    netty 编/解码处理
    MAC 入门
    netty 学习
    php ioc and web rest design
    spring 启动流程
    淘宝美衣人
    ecslipe cdt lib link
    阿里巴巴中间件团队招人了!
    架构师速成-架构目标之伸缩性安全性
  • 原文地址:https://www.cnblogs.com/dmqhjp/p/16115921.html
Copyright © 2020-2023  润新知