I was browsing through some of my posts in another forum and tripped over something I'd completely forgotten.
Quite often we see things like
where the author expects all 3 variables to be defined as Integer Types, whereas in reality only int3 will be of Integer Type the others will default to Variant.Code:Dim int1, int2, int3 As Integer
Normally the suggestion would be to change to
an alternative solution could beCode:Dim int1 As Integer, int2 As Integer, int3 As Integer
The 'DefInt i' statement declares that all variables starting with the letter 'i' default to Integer Type, hence the Dim statement will define all 3 variables as Integer.Code:DefInt i Dim int1, int2, int3
(Look up the 'DefType' statement in msdn)
Does anyone use the DefType statement ? If not why not ?




Reply With Quote