- 7
- 0
- 约1.15万字
- 约 61页
- 2018-03-02 发布于江西
- 举报
Visual Basic程序设计第3章VB程序结构
V B 程序设计 Visual Basic Programming 第三章 3.3 分支(选择)结构 单分支结构 格式1:If 表达式 Then 语句 格式2:If 表达式 Then 语句序列 End If 功能:如果“条件”成立(其值为True)或为非0值,则执行“语句”,否则,直接执行IF语句的下一条语句。 Y N 条件 语句 1. 简单if 2. 块结构if 3. 多分支 4. 条件函数 5. 选择结构嵌套 3.3 分支(选择)结构 单分支结构 举例: 两个数的交换,已知两个数x和y,比较它们的大小,使得x大于y。 If xy Then t=x x=y y=t End If 或:If xy Then t=x: x=y: y=t 1. 简单if 2. 块结构if 3. 多分支 4. 条件函数 5. 选择结构嵌套 格式1: If 表达式 Then 语句1 Else 语句2 格式2: If 表达式 Then 语句1 Else 语句2 End If 功能:如果“条件”成立(True)或为非0值,则执行“语句1”;否则,执行“语句2” 。 3.3 分支(选择)结构 双分支结构 Y N 条件 语句1 语句2 1. 简单if 2. 块结构if 3.
您可能关注的文档
- unit1现在完成时态.ppt
- Unit2 I think that mooncakes are delicious! Section A3a-4d课件.ppt
- Unit2 I think that mooncakes are delicious! section A 1a-2d课件.ppt
- Unit2 Growing pains-Welcome to the unit(译林牛津版高一英语必修一).ppt
- Unit2 Is it an African elephant PPT课件 七年级英语 初一英语.ppt
- unit2 Point to the desk 课件.ppt
- unit2 Maybe you should learn to relax (课件).ppt
- Unit2 what’s the matter mike PartB (人教PEP六年级英语下册)PPT课件.ppt
- Unit2 what’s the matter mike Lesson4 (人教PEP六年级英语下册)PPT课件.ppt
- Unit3 What were you doing when the UFO arrived?.ppt
原创力文档

文档评论(0)