首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

case 中使用 大于号,该怎么解决

2012-04-10 
case 中使用 大于号记得以前见过类似于这样的代码case Index of1: 代码2: 代码某个关键字 3: 代码end现

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就是关键字。
施主,看来是你记错了。

热点排行