Inform 7 Home Page / Documentation
§16.10. Adding and removing rows
Writing in new rows is simple, once we can find space for them:
choose a/the/-- blank row in/from (table name)
This phrase chooses a row in the given table which is currently blank under every column. A run-time problem message is issued if no rows are blank. Example:
choose a blank row in Table 3;
now element entry is "Fluorine";
now symbol entry is "F";
now atomic number entry is 9;
now atomic weight entry is 19;
To avoid problem messages, it can be important to worry about free space. To that end we can not only find the number of rows (as we have already seen) but also the number currently blank and not blank:
number of blank rows in/from (table name) ... number
This phrase produces the number of rows in the given table which are entirely blank (that is, blank under every column).
number of filled rows in/from (table name) ... number
This phrase produces the number of rows in the given table which are not entirely blank (that is, at least one column has a value in this row).
"Filled" here really means "non-blank": a row can be filled in this sense even if only one of its values exists. Since every row is either blank or filled, it must be true that:
the number of blank rows in Table 3
the number of filled rows in Table 3
add up to "the number of rows in Table 3".
We've seen that blank entries can be filled with values using "now":
But the same method can't be used to put blanks back, since a blank is not a value. Instead:
blank out (a table entry)
This phrase replaces the entry referred to with a blank, erasing any value previously stored there. Example:
choose row 1 in the Table of Fish Habitats;
blank out the salinity entry;
These more destructive phrases need a steady hand:
blank out the whole row
This phrase replaces the currently chosen row with blanks, erasing any value previously stored under any of the columns. Example:
choose row 1 in the Table of Fish Habitats;
blank out the whole row;
blank out the whole (table column) column in (table)
This phrase replaces the currently chosen column with blanks, erasing any value previously stored in any of the rows. Example:
blank out the whole salinity column in the Table of Fish Habitats;
blank out the whole of (table)
This phrase replaces every row of the currently chosen table with blanks, erasing any value previously stored anywhere in it. Example:
This is only really useful when a Table is being used to hold working space for some calculation or other.