I'm maintaining a VB6 app. For boolean functions, the original authors store the return value in a boolean variable before checking the result in an If Statement. I prefer to place the function directly in the If Statement. Is this a matter of preference or am I missing a potential pitfall in my style?
Original Author Style
bReturn = IsThisFun(maintainingVb6)
If bReturn = True Then
'You haven't used .NET
Else
'blah
End If
My Style
If IsThisFun(maintainingVb6) Then
'You haven't used .NET
Else
'blah
End If
I'm not sure if there is a proper terminology for these different approaches which may have allowed me to miss a previous post on this topic.
Thanks