Inspection Details
EmptyWhileWendBlock
- Summary
- Identifies empty 'While...Wend' blocks that can be safely removed.
- Reasoning
- Dead code should be removed. A loop without a body is usually redundant.
- The following code example(s) would trigger this inspection:
-
Public Sub DoSomething(ByVal foo As Long)
While foo < 100
Wend
End Sub
- The following code example(s) would not trigger this inspection:
-
Public Sub DoSomething(ByVal foo As Long)
While foo < 100
foo = foo + 1
Wend
End Sub
Back to List