What is the difference between procedure and functions in VB?

Answer Posted / sweeta chandwani

1:-Procedure is a set of code,it simply performs the job(work) which is assigned to it...Function accepts the parameters & does the calculations.
2:-Procedure does not return a value...Function returns a value
3:-while defining the procedure 'sub' keyword is used...While defining the function,'function' keyword is used.
4:-Syntax for procedure:
sub procedure_name(arguements)
statements
End sub
---------------------------
Syntax for function:
function function_name(arguements) as return type
statements
End function

Is This Answer Correct ?    129 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I get a "file not found" error on the IIF function when I distribute by program. Why?

1264


which property of menu cannot be set at run time.

1691


Explain Default cursor Type and LockEdit type in DAO?

889


Through which protocol OLEDB components are interfaced?

1804


What is activex control in vb?

746


How to use hyperlink?

788


Is it possible to call oracle database through ADO control or Object?

1599


What is FireHouse Cursors?

1969


To validate a range of values for a property whenever the property values changes,which type of property procedure you use?

1642


What are the Internet tools available in VB6.0?

2344


What is a thread pool and how are the threads within a thread pool managed?

1825


Is it possible to Access BackEnd procedures?

1801


How can you filter out specific type of file using file system controls?

1606


How many types of API functions are available in VB?

2190


Which method is preferred to save datas like database?

1661