Ask a function related question

Source: Internet
Author: User
Could you tell me a function question? is there any difference between a UDF with a returned value and a function without a returned value ??, Generally, you are used to adding a return value, such as returnfalse, so that you can know whether the program call is successful or not ., This is my opinion. However, a function generally processes data or other operations and returns a value. even if no specific data is returned, I would like to ask a function question.
What is the difference between the return value and the no return value of a function defined by experts ??

------ Solution --------------------
Generally, it is customary to add a return value, for example, return false, so that you can know whether the program call is successful or not.
------ Solution --------------------
This is personal, but generally a function is used to process data or other operations. a return value is returned. even if no specific data is returned, a true or false value is returned, to check whether the function is successfully executed.
------ Solution --------------------
If there is a return value, you can use the return value to determine the processing result of your function.
For example, is the data inserted successfully? The returned values can help you determine and provide correct processing and prompts in subsequent programs.
------ Solution --------------------
Generally, a return value is required after execution. either the specific data is returned or a Boolean value is returned. a Boolean value can be used for next judgment.

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.