Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thoughts on Functions versus Sub Procedures? 1

Status
Not open for further replies.

Vie

Technical User
Jan 22, 2004
115
US
Does anyone have any opinions on using Functions versus Sub Procedures AND in what types of situations one is preferred over the other (besides calculations, returning certain values, etc...situations where functions are required)?

Thanks in advance!
Vie
 
If you need to execute some code without a return value then use a Sub Procedure. If you expect the function to return a calculated value or maybe a boolean value indicating success or failure then use a function procedure. Pretty straight forward.

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Thanks Dr.JavaJoe. Straightforward explanation is exactly what I was looking for. -vie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top