| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 973 人关注过本帖
标题:小生仍是初学者
只看楼主 加入收藏
高科2003
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-3-20
收藏
 问题点数:0 回复次数:7 
小生仍是初学者
大家好本人第一次进入本论坛很高兴能与大家在一起共同讨论VB编程学业这门课程!希望在今后的讨论中能得到高手们的大利支持.谢谢!
  在学习VB的几个星期里,小生遇到过不少困难与凝或,其有一大问题想请教一下大家,不知那位朋友能不能帮一下:就是在VB里所说的if分支语句与select case有什么不同的持点与优点??
   谢谢!
搜索更多相关主题的帖子: 小生 
2005-03-20 12:03
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1366
注 册:2005-3-14
收藏
得分:0 
情況1.當X>Y時,Z=X,
       2.當x=1時,y=5
           當x=2時,y=4
           當x=3時,y=3
           當x=4時,y=8
           當x=5時,y=9
第一個你用SELECT CASE嗎?
第二個你會用IF嗎?

http://toorup.3v.do
loading...
2005-03-20 16:18
glober609
Rank: 1
等 级:新手上路
帖 子:73
专家分:0
注 册:2005-3-7
收藏
得分:0 
1、结构方面
    (1)  a.  if  condition=true then  sentence
           b.  if  condition1= true then
                         sentence1
                 elseif condition2=true then
                          sentence2
                 elseif condition3=true then
                           sentence3
                 else
                           sentence4
                 end if   'if语句块

            c.if  condition1= true then
                         sentence1
              else
                    if condition2=true then
                          sentence2
                    else
                         if condition3=true then
                              sentence3
                         else
                              sentence4
                          end if   
                    end if
               end if
   'if嵌套
    (2)select case
              select case   expression
                        case  exp1
                                sentence1
                         case  exp2
                                 sentence2
             .............

               end select
2005-03-21 09:50
glober609
Rank: 1
等 级:新手上路
帖 子:73
专家分:0
注 册:2005-3-7
收藏
得分:0 
好个天下无贼!
2005-03-21 09:52
BlueDreame
Rank: 1
等 级:新手上路
帖 子:545
专家分:2
注 册:2004-12-16
收藏
得分:0 
select只能对表达式的值进行比较,比if的清晰,if基本适应各种情况。

2005-03-21 09:54
glober609
Rank: 1
等 级:新手上路
帖 子:73
专家分:0
注 册:2005-3-7
收藏
得分:0 
最近论坛人气有所好转,好啊!希望继续保持
2005-03-21 10:07
68816535
Rank: 1
等 级:新手上路
帖 子:133
专家分:0
注 册:2005-3-21
收藏
得分:0 
只要你不变,管人气干什么.

点这发QQ:/pa?p=1:68816535:11" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://wpa./pa?p=1:68816535:11');}" onmousewheel="return imgzoom(this);" alt="" />/msgrd?V=1&Uin=68816535&Site=xiaohb.&Menu=yes" target="_blank">????
2005-03-21 21:02
glober609
Rank: 1
等 级:新手上路
帖 子:73
专家分:0
注 册:2005-3-7
收藏
得分:0 
论坛是需要大家来维持的·!
2005-03-22 11:19
快速回复:小生仍是初学者
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022821 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved