Declares the names of properties and the procedures called when storing and retrieving values.
[ modifier ] [ Var ] Property declarator [ Begin [ parameterList ] [ Get [ statements] ] [ Set parameter [ statements] ] End [ Property ] ]
[ modifier ] Property declarator [ , declarator ]... [ Does traitName . oldName ]
- Optional. One of the following:
- Abstract — Specifies that the property contains no implementation and must be overridden in a concrete class.
- Abstract Get — Specifies that the property is read-only and its Get handler must be implemented in a concrete class.
- Abstract Set — Specifies that the property is write-only and its Set handler must be implemented in a concrete class.
- Override — Specifies that the property is a re-implementation of a property inherited from a base class.
- Shared — Specifies that the property is owned by the enclosing class and not an instance of that class.
- Optional. Explicitly specifies that the property is backed.
- Required. One or more declarative clauses that have a similar syntax to the Dim statement. The simple property permits multiple declarators separated by commas.
name [ ( [ dimensions ] ) ] [ As type | In unit ] [ = initializer ]
- Required identifier or object handle
- Optional. One or more integer expressions separated by commas. Not permitted on unbacked properties.
- Optional data type
- Optional unit of measure
- Optional expression having a data type compatible with type or unit.
- Optional. Marks the start of the multi-line form of the Property statement.
- Optional. Allowed only if the property is an array. A list of integer parameters, separated by commas, which hold the array indices supplied by the caller.
- Marks the start of a procedure that is called when retrieving the current value of the property.
- Marks the start of a procedure that is called when storing a new value in the property.
- Required after Set. It must be the same data type as the property. If you do not specify a data type, the type of the property is assumed.
- Completes the multi-line form. Alternatively, you can use End Property.
A property, like a method, has public visibility. You may declare a property anywhere a method is permitted, namely, within modules, classes, and traits.
By default, ViviFire's properties are implicitly backed. This means that a property declared in the same way as a variable has all of the features of a variable in addition to being publicly accessible.