Sub-procedure and Function

State the major difference between the sub-procedure and function?

E

Expert

Verified

Sub-procedure is a block of multiple visual basic statements within the Sub and End Sub statements. It is used for performing specific tasks, like changing properties of the objects, data displaying, and receiving or processing an output. A sub-procedure can be defined anywhere in the program, such as in modules, structures, and classes. Arguments in the sub-procedure can be specified; but, it does not return a new value.

Function is also a set of statements within the Function and End Function statements. It is similar to the sub-procedure and performs the same task.

Main difference between the function and the sub-procedure is that, the sub-procedures do not return a value while functions do.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.