Today I saw a post http://topic.csdn.net/u/20091201/21/9dd642b8-3e79-4f14-abf0-78306fcd14b3.html in the Forum
It's about these three concepts.
In my opinion, the function is stored in C/C ++
Method in Java
Process in VB
A function is a method with a return value.
No return METHOD FOR THE PROCESS
The method is process decomposition.
However, if you have a one-sided understanding, refer to the answers collected below.
~~~~~~
It seems that the function needs to pass in the parameter, and there is a return value, the process is not necessarily
The method seems to be a piece of code for an object to implement a function.
~~~~~~
Functions and methods are similar. They both implement a function, but functions return only values.
In C #, you can set the return type of a function without return values to void.
A constructor is usually called a function. Other functions are called methods.
There are also differences between functions and methods in the database.
~~~~~~
In C #, except for Constructor translation, the word "function" is reserved. Other commonly called "functions" are called "methods ", during reflection, we can see that type only has getmethod and does not have getfunction. As for "process", it is not a term in C.
~~~~~~
Function> Process
The method may be a function or a process,
A function can also be called a process,
It's just a different name. There is no process concept in C,
In basic, a process is defined as a method with no returned value.
A function is a method with a return value.
~~~~~~
A function is a method with a return value.
There is no return value method for the process.
The method is process decomposition.
~~~~~~
Function:
It can be considered as a product of structured programming. A function can return values or return values (constructor) to complete a function)
Process:
The process in pascall does not return values. It is a special method (this is not the return value, but the process). I really don't understand why pascall does this...
Method:
Generally, classes-related functions are called methods, which may be the product of object-oriented functions.