case 中使用 大于号
记得以前见过类似于这样的代码
case Index of
1: 代码
2: 代码
某个关键字 > 3: 代码
end;
现在说什么也想不起来 那个关键字 是什么了。
难道是我记错了?
如果没错,请大家告诉我那个关键字 。先谢过了!
[解决办法]
case Index of
1: 代码
2: 代码
else 代码
end;
[解决办法]
http://topic.csdn.net/t/20030723/09/2060619.html
还是用If ....Then .. Else ...吧!
[解决办法]
case Index of
1: 代码
2: 代码
3..MaxInt: 代码
end;
[解决办法]
可以这样,先定义一个TempList:TStringList;
TempList := TStringList.create;
try
TempList.add('男');
TempList.add('女');
case TempList.indexof(edit1.text) of
0: begin
end;
1: begin
end;
end;
finally
TempList.free;
end;
--------------------------
case I of
1..5: Caption := 'Low';
6..9: Caption := 'High';
0, 10..99: Caption := 'Out of range';
else
Caption := '';
end; end;
[解决办法]
Delphi下Case只支持有序型变量的分支如Integer、枚举等
根本不存在你说的那种语法,数据库sql语句中的case when..then...else...end支持你说的那种
[解决办法]
else就是关键字。
施主,看来是你记错了。