例题: If xxx then Dim a as long if xxx then Dim b as long '就在 IF 范围内,过后就消失 这里可以用 a 变量 End if b 变量已经销毁 if xxx then Dim b as long '就在 IF 范围内,过后就消失 End if end if 代码块 包括 Do For Whil 等等 For i as long=0 to 100 'FOR 可以直接在语句中声明变量。只在 For 范围内有效 当一个函数内代码多时,就不需要为临时变量烦恼了,各用各的。 |
|
来自: nxhujiee > 《◆VisualFreeBasic》