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