Property Set Statement
In the Class block, declare the name, parameters, and code, which constitute the body of the property procedure that sets the reference to the object.
[Public | Private] Property Set name(
[arglist,] reference
)
[statement]
[Exit Property]
[statement]
End Property
Parameters
Public
Indicates that the property Set procedure can be accessed by all other procedures in all scripts.
Private
Indicates that the property Set procedure can only be accessed by other procedures in the same Class block that is declared.
Name
The name of the property Set procedure, followed by a standard variable naming convention, but the name can be associated with the Property Get or property letClass block The c12> process is the same.
ArgList
A list of variables that represents the arguments passed to it when the property Set procedure is invoked. Multiple parameters are separated by commas. Additionally, the propertyset procedure will always have one more argument than its corresponding property-get procedure. This extra argument is given to the object.
Reference
Variable that contains the object reference to the right of the object reference assignment.
Statement
Any set of statements that will be executed in the body of the property Set procedure.
Note Each property Set statement must define at least one parameter for the defined procedure. When a procedure defined by a property Set statement is invoked, the required parameter, which is the last argument when multiple arguments are made, provides the actual object reference for the attribute. In the previous syntax, this argument is referred to as a reference.
Description
Unless explicitly specified with public or Private, the property set procedure is set to the default common mode, where all other procedures in the script are visible. When different procedure calls, local variables in the propertySet procedure are not saved.
The property Set procedure cannot be defined in any other procedure, such as a function or Property let.
The Exit Property statement causes an immediate exit from the property Set procedure. The program continues to execute the statement after the property Set procedure is invoked. The number of the Exit Property statement is unrestricted and can appear anywhere in the property Set procedure.
As with Function and Property Get procedures, the property Set Procedure is a separate process that can have several parameters, execute a series of statements, and change the value of the parameter. However, unlike function and Property Get procedures, both functions and procedures can return a value, while the property Set Procedure object references the left side of the assignment (the Set statement).