![]() | Chapter 15: Tables | ![]() ![]() |
15.9. Blank rows |
There is no difficulty about entirely blank rows: or rather, the only difficulty is once again that they are boring to type out. We can avoid the necessity by appending "with ... blank rows" at the foot of the table:
Table 2 - Selected Elements
Element Symbol Atomic number Atomic weight "Hydrogen" "H" 1 a number "Iron" "Fe" 26 -- "Zinc" "Zn" 30 -- "Uranium" "U" 92 -- with 3 blank rows
(These words cannot be placed in between rows, but only at the bottom.) And indeed the table can start out completely empty:
Table 3 - Undiscovered Periodic Table
Element Symbol Atomic number Atomic weight text text a number a number with 92 blank rows
Blank rows are useful because they enable us to add new data to a table. In effect, they are invisible when not used. A repeat loop like
repeat through Table 3:
...
automatically skips blank rows, so it would initially do nothing at all. Similarly, choosing a "random" row will never choose a blank one.
A convenient way to test if a table contains non-blank rows is to use the built-in adjectives "empty" and "non-empty". So:
if the Undiscovered Periodic Table is empty, ...
tests whether all of its rows are blank; if even one cell contains a value then the table is "non-empty".
| ![]() A sound recording device that records the noises made by player and non-player actions, then plays them back on demand. |
|
Previous | Contents | Next |