Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3073246
  • 博文数量: 1412
  • 博客积分: 15478
  • 博客等级: 上将
  • 技术积分: 14938
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-23 16:08
文章存档

2016年(1)

2015年(17)

2013年(13)

2012年(103)

2011年(185)

2010年(261)

2009年(425)

2008年(363)

2007年(44)

分类:

2009-03-22 23:40:14

select case 结构是多分支控制结构.也叫多项判断,是从多个选项中选出一项执行,在功能上等于If then else语句.当列出内容较多时,用select case比用If.. then ...else更容易理解。
 
Select case 测试条件
   [case 表达式1
     [语句序列1]]
   [case 表达式2]
      [语句序列2]
  。
  。
  。
  
[case else]
       [语句序列N]
End Select
 
 
 
 
 
 
...
static Index As Ingeger
  Index = Index + 1
Select Case Index                      
case 1                                 
  Form1.caption = "A"                  
case 2
  Form1.caption = "B"
Case 3
  Form1.caption = "C"
  Index = 0
Case else
  Index = 0
End Select
......
阅读(576) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~