Delphi function parameter description

Source: Internet
Author: User

I. Prototype Declaration

1. The prototype declaration is located in the public part (ineterface). The declaration is used to indicate whether the function is disclosed to other units. Therefore, the statement is not declared if you do not open a bill.

2. However, if an original declaration exists, the definition of the function must be based on the prototype declaration.

Ii. parameter transfer method

1. Value Parameters

2. Address Transfer Parameters (variable parameters)

The declared syntax is to add a reserved word var before the parameter identifier.

3. out parameters

The out parameter is another parameter. It is the same as the variable parameter and is a transfer address. However, the out parameter does not use the address retrieval method. Although the out parameter receives the address of the input parameter, the final result is the variable name of the out parameter, the alias of the input parameter. Simply put, the out parameter and the input parameter are in the same memory address. The two variables (parameters) can be said to be the same body, and the out parameter address is equal to the address of the input parameter.

Declaration syntax. Add a reserved word "out" before the parameter name"

4. Constant parameters,

A constant parameter is like a local constant or a read-only variable. Constant parameters and value parameters are the same. In other words, the constant parameter value only copies the input parameter value. But because it is a constant declared in the function, it cannot be set in the program.

5. array parameters

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.