Private Sub Comkmand1_Click() Dim a as Boolean a = True If a Then GoTo L1 Else GoTo L2 L1:Print "VB" L2:Print "VC" End Sub 程序输出结果为 VB VC 为什么? 什么叫顺序输出?
茅侃侃
浏览 428回答 2
2回答
陪伴而非守候
程序已经成功跳转到了L1标签处,结果执行完L1行的语句后,程序又顺序执行下去了,你可以这样改Private Sub Comkmand1_Click()Dim a as Booleana = TrueIf a Then GoTo L1 Else GoTo L2L1:Print "VB"GoTo EndL2:Print "VC"End:End Sub