Case 语句要怎么用??
procedure TForm1.Button1Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of <--ItemIndex是什么,有什么功能??
0: Color := clRed;
1: Color := clYellow;
2: Color := clBlue;
3: Color := clLime;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
Str : string;
begin
Str := RadioGroup1.Items[RadioGroup1.ItemIndex];
case Length(Str) of
1: Color := clRed;
2: Color := clYellow;
3: Color := clBlue;
4: Color := clLime;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin //Items.CommaText是什么,有什么功能?
RadioGroup1.Items.CommaText := 'a, bb, ccc, dddd';
//ItemIndex又是什么???
RadioGroup1.ItemIndex := 0;
end;
begin
case RadioGroup1.ItemIndex of <--ItemIndex是什么,有什么功能??
0: Color := clRed;
1: Color := clYellow;
2: Color := clBlue;
3: Color := clLime;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
Str : string;
begin
Str := RadioGroup1.Items[RadioGroup1.ItemIndex];
case Length(Str) of
1: Color := clRed;
2: Color := clYellow;
3: Color := clBlue;
4: Color := clLime;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin //Items.CommaText是什么,有什么功能?
RadioGroup1.Items.CommaText := 'a, bb, ccc, dddd';
//ItemIndex又是什么???
RadioGroup1.ItemIndex := 0;
end;
...全文
相关推荐
第三章、Verilog高级语法及用法.pdf
**并行case语句(Parallel Case Statement)**: `casez`语句的一个特殊应用是实现并行case结构,可以同时处理多个输出。
Verilog语言中case语句详解及优化
#### 一、case语句基础`case` 语句的基本语法如下:```verilogcase (expression) case_item1: statement1; case_item2: statement2
switch-case语句用法
**基本语法:**switch(表达式){ case 常量表达式1: 语句1; break; case 常量表达式2: 语句2; break; ... case 常量表达式n: 语句n; break;
MySQL 的CASE WHEN 语句使用说明
CASE语句在数据库处理中起到了类似编程语言中条件判断的作用,使得你可以更灵活地处理数据。
oracle case when 语句的用法详解
Oracle的CASE WHEN语句是SQL语言中的一个强大工具,用于根据特定条件返回不同的值或执行不同的操作。本文将详细介绍CASE WHEN表达式的两种形式、在不同语句结构中的使用方法以及IF-T


