The most fundamental difference between the sub procedure and the function procedure is that the Sub procedure cannot return a value, but the Function procedure can return a value.
There are two types of procedures in Visual Basic:
① Internal functions and event procedures provided by the system;
② User-defined according to their own needs , for multiple calls to the event process, among which the sub-process is the most used. What they have in common is a set of program codes that perform a specific function; the difference is that a function is a special procedure with a return value, so the function procedure definition has a type specification of the return value.
The above is the detailed content of What is the most fundamental difference between sub procedure and function procedure?. For more information, please follow other related articles on the PHP Chinese website!