5.3.1.7 Property Declarations

Static Semantics

§ A <property-LHS-declaration> containing the keyword Let is a property let declaration.

§ A <property-LHS-declaration> containing the keyword Set is a property set declaration.

§ Each property declaration MUST have a procedure name that is different from the name of any other module variable, module constant, enum member name, external procedure, <function-declaration>, or <subroutine-declaration> that is defined within the same module.

§ Each <property-get-declaration> in a module MUST have a different name.

§ Each property let declaration in a module MUST have a different name.

§ Each property set declaration in a module MUST have a different name.

§ Within a module at a common procedure name can be shared by a <property-get-declaration>, a property let declaration, and a property set declaration.

§ Within a module all property declaration that share a common procedure name MUST have equivalent <parameter-list> elements including the number of <positional-parameters>, <optional-parameters> and <param-array> elements, the name value of each corresponding parameter, the declared type of each corresponding parameter, and the actual <parameter-mechanism> used for each corresponding parameter. However, corresponding <optional-param> elements can differ in the presence and data value of their <default-value> elements and as can whether or not the <parameter-mechanism> is implicitly specified or explicitly specified.

§ The declared type of a <property-LHS-declaration> is the declared type of its <value-param> element.

§ The declared type of a property set declaration MUST be Object, Variant, or a named class.

§ Within a module a property let declaration and a <property-get-declaration> that share a common procedure name MUST have the same declared type.

§ If the <value-param> of a <property-LHS-declaration> does not have a <parameter-mechanism> element or has a <parameter-mechanism> consisting of the keyword ByRef, it has the same meaning as if it instead had a <parameter-mechanism> element consisting of the keyword ByVal.

Runtime Semantics

§ The <value-param> of a <property-LHS-declaration> always has the runtime semantics of a ByVal parameter.

§ If a <property-LHS-declaration> includes a <param-array> element the argument value corresponding to the <value-param> in an invocation of the property is not included as an element of its param array.