Column names and Numbers

I am using a table in which all of the entries are Rooms, but each column of the table is a different set / sequence of Rooms. It’s to describe the movements of an NPC in different circumstances. It would be nice to be able to refer to the entries as row X of Column Y, where X and Y are number variables, but there doesn’t seem to be a mechanism for that - you have to specify the column name.

I know it’s a trivial problem and I can work around it. If it’s not available, I’ll use a one column table with different (numeric) starting rows, or I could perhaps devise a function to return column names (which are text items?) from numbers, but it kind of irritates me to fudge it.

You could just keep a list of table columns.

EDIT: Sorry, I see you’ve more or less thought of this plan already. (Table column is a kind in its own right. Actually, for this case, it would be “number valued table column”.)

I think part of the issue is that table columns are shared between tables and with table continuations there can be little resemblance between the order of columns in your code and the order it gets compiled to. If you need them in a strict order then it might be better to use lists instead of tables.

Yes, as it turns out, I’m implementing with a 1-column table and numerical row offsets. Thanks both.

That’s approximately what I did when I had a table to keep track of the grid map in Terminator; I had a phrase

To decide what number is (x - a number) graphed by (y - a number): decide on ((x - 1) * grid size) + y.

(where grid size was the number of “rows” in the grid). Then I could write

choose row x graphed by y in the Table of Planetary Surface

I also found it useful to have columns for what the x- and y-coordinates were. Well, I may or may not have used it, but it was nice to know it was there.