VB if...then...能不能直接嵌套if

来源:百度知道 编辑:UC知道 时间:2024/05/28 07:43:29
if a=b then x=input(x)
然后在这个if语句内判断X是不是数字,要怎么写
不能直接写if,那样就不是在原来的if内判断了。

可以
if 条件 then
if 条件 then

endif
endif

可以嵌套

if a=b then
x=input(x)
if x>='0' and x<='9' then
……
end if
end if
在中间适当的写上你要的语句就行了

可以 简单的问题