VB编程变量命名大小写
变量命名大小写,语句错落有秩,源代码维护方面
下面大家比较一下以下两段代码:
读懂难度很大的`代码:
Dim SNAME As String
Dim NTURN As Integer
If NTURN = 0 Then
If SNAME = "vbeden" Then
Do While NTURN < 4
NTURN = NTURN + 1
Loop
End If
End If
容易读懂的代码:
Dim sName As String
Dim nTurn As Integer
If nTurn = 0 Then
If sName = "vbeden" Then
Do While nTurn &
nTurn = nTurn + 1
Loop
End If
End If