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 |
Why we use Treeview Control?
HTML stands for What? Use of HTML ?
How do I make a text box not beep but do something else when I hit the Enter key?
Is it possible to Access BackEnd procedures? Explain.
what is the meaning of cts company logo?..
How would you map properties to controls by using ActiveX Control Interface Wizard?
How do you call a function in a DLL?
How can you Add API functions to your Application?
What are the types of API Types?
What is the purpose of the ClipControls property on a form or container?
What is the size of the variant data type?
Is the Variant type slower than using other variable types?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)