Previous: , Up: Insertion   [Contents][Index]


7.1.2.2 Insertion into Structures and Similar Data Classes

You can insert into structures (Structures), lists (Lists), and ranges (Ranges) using subscripts, for example

var(number) = expr

where number is a single integer number which indicates the index of the element in the list that is to be modified. The first element has index zero. The index must lie within the valid range.

Insertion into structures can also go according to

var.keyword = expr

where keyword must be one of the keywords specified in the structure.

The intention is to expand this kind of insertion to allow multiple levels of insertion target specifications (such as x.3(5).ALPHA = y), but this is not yet implemented.