Default properties

[next] [prev] [prev-tail] [tail] [up]

#### 6.7.4 Default properties

Array properties can be declared as default properties. This means that it is not necessary to specify the property name when assigning or reading it. In the previous example, if the definition of the items property would have been

Property Items[i : Longint]: Longint Read GetInt
Write SetInt; Default;

Then the assignment

AIntList.Items[26] := 1;

Would be equivalent to the following abbreviation.

AIntList[26] := 1;

Only one default property per class is allowed, but descendent classes can redeclare the default property.

[next] [prev] [prev-tail] [front] [up]