Inspection Details

HungarianNotation


Summary
Flags identifiers that use [Systems] Hungarian Notation prefixes.
Reasoning
Systems Hungarian (encoding data types in variable names) stemmed from a misunderstanding of what its inventor meant when they described that prefixes identified the "kind" of variable in a naming scheme dubbed Apps Hungarian. Modern naming conventions in all programming languages heavily discourage the use of Systems Hungarian prefixes.
The following code example(s) would trigger this inspection:

Public Sub DoSomething()
    Dim bFoo As Boolean, blnFoo As Boolean
    Dim intBar As Long ' which is correct? the int or the Long?
End Sub
Private Function fnlngGetFoo() As Long
    fnlngGetFoo = 42
End Function

The following code example(s) would not trigger this inspection:

Public Sub DoSomething()
    Dim foo As Boolean, isFoo As Boolean
    Dim bar As long
End Sub
Private Function GetFoo() As Long
    GetFoo = 42
End Function


Back to List