Table Manipulation

There are ways to add rows later in code or extensions with continuations.

Is there a similar way to add columns? It would be so handy.

I’m not sure about columns but you can add rows by using “Table of Data (continued)” to extend the table. See “15.18. Table continuations” in the Inform 7 Documentation for more details.

Hope this helps.

Right, I know you can add rows. I use that feature a lot and it is extremely useful.

Adding columns would be equally useful, if possible?

As far as I know, this is not possible. (In which situations do you think it would be useful? I have never come across one.)

I have a table strewn wildly across many extensions at this point. I’d like to add a point of data(a new column), and there’s no way to do that except to hunt down every table and add it to each manually. This is a great sadness.

You don’t have to add the new column to every continuation of the the original table. If you add it as a (possibly blank) column to the original table, you can use that column or not as you like in continuations of that table.

E.g. this seems to work as expected:

Include Unicode Character Names by Graham Nelson.

The Agora is a room.
Script is a kind of value. The scripts are Latin, Greek, Cyrillic.

When play begins: say the Theta corresponding to a script of Greek in Table 1; say the Zeta corresponding to a script of Cyrillic in Table 1.

Table 1
Script	Alpha	Beta	Gamma	Delta	Epsilon	Eta	Zeta	Theta
Latin	"A"	"B"	"C"	"D"
Greek	"Α"	"Β"	"Γ"	"Δ"

Table 1 (continued)
Script	Alpha	Beta	Gamma	Delta	Epsilon	Zeta
Cyrillic	"А"	"Б"	"Г"	"Д"	"Е"	"З"

Table 1 (continued)
Script	Epsilon	Eta	Zeta	Theta
Greek	"Ε"	"Η"	"Ζ"	"Θ"
Latin	"E"	"H"	"Z"

Well, damn, really, that easy? Fantastic. It will assume empty then?

Maybe you figured this–but yes, it assumes unfilled entries are empty. But I think you need to define something in the original table so you know what it is.


table of random data
entry 1 entry 2 entry 3
1 2

Would throw an error, since we don’t know what entry 3 is.

Yes. This:

[code]table of random data
entry 1 entry 2 entry 3
1 2

table of random data (continued)
entry 3
actually compiles, but I don’t know if it would, if the tables were split between extensions.
I agree it’s probably wise to write

table of random data entry 1 entry 2 entry 3 (number) 1 2
if you leave entry 3 blank in the original table.