What is the difference between a Sub and a Function?
Answers were Sorted based on User's Feedback
Answer / suresh
Sub won?t return values
Fuction return values
Correct me If i was Wrong..
Is This Answer Correct ? | 28 Yes | 3 No |
Answer / mukesh
A function accepts any number of parameters (possibly
zero), does something with them, and returns a value.
A subroutine is performs an action, but doesn't return a
value.
There are two differences between a function and a
subroutine:
A)How they are invoked. B)How they are accessed.
A function call has the following syntax ::function (arg1,
arg2, ...)
where: function -->Is the name of the function. arg1,
arg2, ... Are the arguments.
A subroutine call has the following syntax ::subroutine
(arg1, arg2, ... {outputfield|'format'})
where: subroutine -->Is the name of the subroutine. arg1,
arg2, ... Are the arguments.
{outputfield|'format'} Is the name of the output field or
its format.
In addition, on some platforms, the functions are available
immediately; whereas, the subroutines are available in a
special subroutine library that you must access.
Is This Answer Correct ? | 17 Yes | 4 No |
Answer / sneha wankhede
Sub won?t return values
Fuction return values
Is This Answer Correct ? | 1 Yes | 0 No |
Where can I get good up-to-date information about VB?
Specify technical & functional architecture of your last 2 projects.
What is Vlookup introduction and formula?
What do you mean by Databound Controls Explain?
Is it possible to Manipulate data through flexgrid? Explain.
How do you avoid the "Invalid use of null" error when reading null values from a database?
What is ADO? What are its objects ?
How do I get the Tab key to be treated like a normal character?
What is the need of z-order method?
what is the Max size allowed for label caption length?
How would you create properties in ActiveX Control?
Difference between Linked Object and Embedded Object?