Comparison functions, methods, and processes

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.