What is the difference between a Sub and a Function?
Answer Posted / 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 |
Post New Answer View All Answers
How would you create properties in ActiveX Control?
Types of DBCombo boxes
How do I do Peek and Poke and other low-level stuff?
In which areas the Error occurs?
What do you know about chaining views.
How would you map properties to controls by using ActiveX Control Interface Wizard?
How would you attach pictures in column headers of List View Control?
___ property is used to change to ___ value to access a identity column'in datacontrols.
what are the Types of LockEdits in RDO?
What is activex control in vb?
How would you navigate between one document to another document in Internet Explorer ?
Is it possible to change menu runtime using API? If yes? Specify the function names.
Types of cursors in RDO.
What is hyperlink?
How can you filter out specific type of file using file system controls?