Inform 7 Home Page / Documentation


§21.7. Lists of values matching a description

The useful "list of ..." syntax can also be used to produce lists of the values matching a description, too. Thus:

let L be the list of non-recurring scenes;
let C be the list of colours;

There is little to say here except for the usual warning that some kinds of value have a range which is too large to make this possible. For instance, Inform could not sensibly represent:

let N be the list of even numbers;

It would just be too large to hold. In general, if we can repeat through, or find the number of, values matching a description, then we can also use "list of" to bring them all together. See the chart of kinds of value in the Kinds index for a project for which kinds of value allow this.


arrow-up.png Start of Chapter 21: Lists
arrow-left.png Back to §21.6. Lists of objects
arrow-right.png Onward to §21.8. Sorting, reversing and rotating lists