Differentiate function and sub-procedure

Write major difference between function and sub-procedure?

E

Expert

Verified

Sub-procedure is the block of several visual basic statements within Sub and End Sub statements. It is used to carry out certain tasks, like displaying an output, changing properties of the objects, and receiving or processing data. We can define the sub-procedure anywhere in the program, like in classes, modules, and structures.We can also give arguments in the sub-procedure; though, it does not return the new value.

Function is also a set of the statements within a Function and End Function statements. This is similar to a sub-procedure and does a same task. Important difference between the function and sub-procedure is that the sub-procedures do not return the value whereas functions do.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.