Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Expressions > Primaries > Accessors > Subscriptions

Subscriptions

Subscription selects an item (or items) from a sequence or array.

The left-side expression handles the reference according to its type. Classes can have callbacks for references.

It is possible to return slices from an object if the object supports this. This can accomplished by using a range operator ``x..y´´ and/or expression lists ``x,y,..´´ within brackets.

Empty brackets indicate an append operation, which can only be used on the left side of assignments.

  acc-reference  := "[" expr-list "]" 
  acc-reference  := "[" "]" 
See also  | Accessors  | Ranges  | Grammar
Contributes notes:
Add a note
What's new | Anvil