What is the Difference between a sub and a function?

Answer Posted / bart calixto

yeah, sure.. everyone says that but...

what's the purpose of sub.?
I can do a function

Function ThisIsASub()
write "HELLO WORLD"
end Function

wow! I have a sub now.

so, besides the stupid reason that sub don't return value, what's the point of using subs?

If like someone create a newIF but it doesn't support ELSE... what's the point?

Greetings,
Bart.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a debug and release build?

593


Which Namespace is used to to achieve MultiThreading in .NET?

587


What is implement a generic action in webapi?

728


What is the difference between server.transfer and response.redirect? Why?

596


Tell us why do we use the “using” statement?

551






What is meant by globalization and localization?

587


Explain attributes in dot net?

574


Can you edit data in repeater control? How?

575


Explain can 2 different applications use the same dll in gac at the same time?

581


Explain how to redirect tracing to a file?

557


What is assemblies in .net?

632


what user controls are and what server controls are and the differences between the two.

1612


What are the main components in .net?

535


What is the use of Treeview control?

618


What is UDDI and how to register the web service in it?

628