标准嵌套块应缩进 4 个空格。
过程的概述注释应缩进 1 个空格。
概述注释后的最高层语句应缩进 4 个空格,每一层嵌套块再缩进 4 个空格。例如:
'*********************************************************
' Purpose: Locates the first occurrence of a specified user
' in the UserList array.
' Inputs: strUserList(): the list of users to be searched.
' strTargetUser: the name of the user to search for.
' Returns: The index of the first occurrence of the strTargetUser
' in the strUserList array.
' If the target user is not found, return -1.
'*********************************************************
Function intFindUser (strUserList(), strTargetUser)
Dim i ' Loop counter.
Dim blnFound ' Target found flag
intFindUser = -1
i = 0 ' Initialize loop counter
Do While i <= Ubound(strUserList) and Not blnFound
If strUserList(i) = strTargetUser Then
blnFound = True ' Set flag to True
intFindUser = i ' Set return value to loop count
End If
i = i + 1 ' Increment loop counter
Loop
End Function