delphi2007 教程

delphi2007 教程

首页 新随笔 联系 聚合 管理
  1013 Posts :: 0 Stories :: 28 Comments :: 0 Trackbacks
如何判断一个变量是否等于很多值中的一个? Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiBase/html/delphi_20061211105425201.html
变量temp,  
  如何判断temp是否等于   {1,2,3,4,7,8,11,12,45,58,56,94,54,5,48,321,123,456,789,951,423,956,957}  
  中的一个?  
  要最简单的方法

if   temp   in   [1,2,3,4,7,8,11,12,45,58,56,94,54,5,48,321,123,456,789,951,423,956,957]   then   存在   else   不存在

if   temp   in     [1,2..20,50,60]   then   ;

jf

posted on 2009-02-11 16:50 delphi2007 阅读(492) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。