Inform 7 Home Page / Documentation


§16.8. Blank columns

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

paste.png 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:

paste.png 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:

paste.png 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


arrow-up.png Start of Chapter 16: Tables
arrow-left.png Back to §16.7. Blank entries
arrow-right.png Onward to §16.9. Blank rows