Subs vs. Functions
Posted on 2001-06-22
I've recently inherited a VB project that has been in development for over a decade. My question concerns performance of Subs vs. Functions. All procedures are defined as Functions whether or not anything is returned.
No Public or Private scope set (Public By default)
No Return type (Does it default to Variant? Is it wasting resources?)
Here is a typical Example showing the syntax:
'SumFunction is NOT set to anything
There is a significant number of these functions (100's) that are declared this way. If I were to correct the above example, it would be like this:
Public Sub SumFunction()
Is it worth my time and effort to correct these? Is there any performance benefit to converting these functions that don't return values to Subs?
Thanks for the input,