| Chapter 15: Tables |

| 15.8. Blank columns

An entire column of blank entries "--" is problematic:

> Table 2 - Selected Elements

> Element | Symbol | Atomic number | Atomic weight
> "Hydrogen" | "H" | 1 | --
> "Iron" | "Fe" | 26 | --
> "Zinc" | "Zn" | 30 | --
> "Uranium" | "U" | 92 | --

Inform is unable to work out what kind of value should go into the "atomic weight" column here, since it has no examples to guess from. We can get around this by writing in the name of a kind of value:

> Table 2 - Selected Elements

> Element | Symbol | Atomic number | Atomic weight
> "Hydrogen" | "H" | 1 | a number
> "Iron" | "Fe" | 26 | --
> "Zinc" | "Zn" | 30 | --
> "Uranium" | "U" | 92 | --

That top entry in the "atomic weight" column is also blank, but now Inform knows that anything put into the column in future will be a number.

If there are many rows, and perhaps several blank columns, it would become very tedious to have to keep typing out "--". So this is optional at the end of a row: it remains compulsory for a blank value appearing in between two values which aren't blank. This is the general idea:

> Table 2 - Selected Elements

> Element | Symbol | Atomic number | Density | Specific gravity
> "Hydrogen" | "H" | 1 | a number | a number
> "Iron" | "Fe" | 26
> "Zinc" | "Zn" | 30
> "Uranium" | "U" | 92

Previous | Contents | Next