Home Segments Index Top Previous Next

412: Sidetrip

Once an element of an ordered collection is in place, you can, if you wish, get that element with an at: message and an integer index, and you can set that element with an at:put: message and an integer index.

Thus, ordered collections act as though they were expandable arrays, and ordered collections are therefore handy when you want to be able to access elements by integer indexes, but you are not sure how many elements there will be in advance.