Chapter 16: Tables
§16.1. Laying out tables; §16.2. Looking up entries; §16.3. Corresponding entries; §16.4. Changing entries; §16.5. Choosing rows; §16.6. Repeating through tables; §16.7. Blank entries; §16.8. Blank columns; §16.9. Blank rows; §16.10. Adding and removing rows; §16.11. Sorting; §16.12. Listed in...; §16.13. Topic columns; §16.14. Another scoring example; §16.15. Varying which table to look at; §16.16. Defining things with tables; §16.17. Defining values with tables; §16.18. Table continuations; §16.19. Table amendments
|Contents of Writing with Inform|
|Chapter 15: Numbers and Equations|
|Chapter 17: Understanding|
|Indexes of the examples|
§16.1. Laying out tables
When printed books need to display detailed information in a systematic way, they break off from running text and print a table instead. Inform does the same. Here is a typical example:
Table 2.1 - Selected Elements
After the two titling lines, each line represents one row in the table, and entries on a line must be separated by at least one tab character. A table must occupy a single whole paragraph, with no skipped lines or missing entries.
The top line is a title, the first word of which must be the word 'Table'. We can then either give a table number (this need not actually be a number: Table C2, or some such, would be fine), or give a name, or both - as in this case. The possible titling formats are:
Table of Population Statistics
Table 2.3 - Population Statistics
In the last example we could call the table either "Table 2.3" or "Table of Population Statistics".
Each column then has a name, and the contents must all be the same kind of value. In the elements table the "Symbol" column contains only text, for instance, and the "Atomic weight" column contains only numbers. Any kinds of value will do, so long as all the entries in the column are mutually compatible. (For instance, mixing rooms and things in a single column would be fine, as these can be reconciled, but mixing numbers and rooms would not.)