Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Function without return type

In my project (which I inherited from someone) there are a lot of functions like:

Public Function DoSomething(ByVal s As String)
    ' Do something to public properties
End Function

And they are called like this:

DoSomething(s)

So the return value is ignored (which is object, as I see in the docs). Is it safe to change all these functions to Subs? Could I break something which isn't so obvious?

like image 671
sventevit Avatar asked Dec 23 '10 10:12

sventevit


1 Answers

Should be safe. That's what Subs are for, this is really bad style by your predecessor.

like image 93
Jules Avatar answered Oct 10 '22 18:10

Jules