1. 首页 > 教育

else没有if vb else没有if

else 没有 if

If a > b Then Label1.Caption = "对" Else Label1.Caption = "错" End If

else没有if vb else没有if

Else没有If

if语句在vb语言家族中有行式写法和块式写法两种,如果用行式写法,注意写在一行上并且不需要end if,如 if a > b then label1.caption = "对" else label1.caption = "错" 如果是块式写法,则要在then后换行,如 if a > b then label1.caption = "对" else label1.caption = "错" end if

为什么说else没有if 呢

private sub command1_click() if b > 100 then text1.backcolor = vbred else text1.backcolor = vbblue end if end sub 有else 出现 then 同行后面为空 语句需换行

else 没有 if ??

对呀,因为这是选择的问题,如果是的话(if (a>c);)就执行cout

VB else没有if ?是怎么回事

If Option1(1).Value = True Then A(j) = 5 这种是简写后面就不能有end if,改成 If Option1(1).Value = True Then A(j) = 5 ElseIf Option1(2).Value = True Then A(j) = 4 ElseIf Option1(3).Value = True Then A(j) = 3 ElseIf Option1(4).Value = True Then A(j) = 2 ElseIf Option1(5).Value = True Then A(j) = 1 End If

为什么总显示else前面没有if

if(065<=x&&x<=90); 这行后面有个分号,表示if..else..语句已经结束,所以后面的else if是另外一个语句了,和前面的if没有任何关系了,if语句正确的写法是 if(){ }else if(){ }else if(){ }else{ } 初学者写代码严谨一点,把大括号带上,参考书上肯定写了大括号,不要自己乱搞一通

vb中else没有if 是什么意思

表示代码错误

VB编译错误 else 没有if 但是明明写了if

vb中的if语句有两种形式,一种是换行的,一种是不换行的:1、换行的格式:if xxxx then(到这儿必须换行) XXXXX [elseif XXXX then(到这儿又必须换行) xxxxx] [else.

帮忙看看,提示else没有与if匹配!!

显然没有匹配 if 下面那三行用大括号括起来吧

编程c语言else找不到if

if的)后面不能有分号,你下面的语句:if(a 需要修改为:if(a