PropertyShape Function R←Shape {ipa}

The name of the PropertyShape function must be Shape, but is case-independent. For example, shape, Shape, sHape and SHAPE are all valid names for the PropertyShape function.

A PropertyShape function is only called if the Property is a Numbered Property.

The PropertyShape function must be niladic or monadic and must return a result.

If monadic, ipa is an instance of the internal class PropertyArguments. ipa.Name contains the name of the Property being referenced and NewValue and Indexers are undefined (VALUE ERROR).

The result R must be an integer vector or scalar that specifies the rank of the Property. Each element of R specifies the length of the corresponding dimension of the Property. Otherwise, the reference or assignment to the Property will fail with DOMAIN ERROR.

Note that the result R is used by APL to check that the number of indices corresponds to the rank of the Property and that the indices are within the bounds of its dimensions. If not, the reference or assignment to the Property will fail with RANK ERROR or LENGTH ERROR.

Note

It is not possible to predict the number of times that a PropertyGet, PropertySet or PropertyShape function will be called by a particular APL expression, as this depends upon how that expression is implemented internally. You should therefore not rely on the number of times that a Get, Set or Shape function is called, and none should have any side effects on any other APL object