热插拔硬盘:VB编程问题!

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/05 11:23:19
最近刚学了vb,用的是vb6.0,可有个问题不懂,就是怎样在判断语句中再添加一个判断语句?格式是什么?还有判断的顺序是什么?
我是要从内到外的顺序判断啊!不是1楼说的!

是不是
select case 表达式
case 条件1
语句块
case 条件2
语句块
。。。。。
case else
语句块
end select

怎么可能由内道外呀 具体实践可以把1楼的1换成2 2换成1
if 条件2 then
if 条件1 then
else
end if
else
end if

if 条件1 then
if 条件2 then
else
end if
else
end if

if ... then
if ... then
else
end if
elseif ... then
...
end if

VB的运行的机制就是由上到下,判断语句是从外到内的判断,不可能说是先判断里面的条件是不是对的,再判断外面的。

支持3楼的