Writing a table with a column of a list of numbers to file

As stated in the manual, I get that we can’t write files of tables containing info like rules, but we can write to file tables that contain simple text and numbers.

If you try and write a table containing, say rules, then we get a runtime error, as expected.

If we write a table with a list of numbers, then there is no runtime error, so supposedly this is allowed, but on inspection of the file, the entries seem to be memory pointers, not the actual list of numbers, and so on reading the table back in on a separate run the table is meaningless.

Is this a bug? Is there a built in way to achieve this? (Currently I’ve resorted to converting each list of numbers to a text string, storing in a separate table to write to file, and then convert the text back to a list of numbers again on reading in the table. This is slow as my table is large…)

Anyone? Is this a bug?

I don’t think Inform supports serializing lists automatically, since (unlike tables) they’re dynamically resized and allocated.

The manual isn’t particularly clear about this. WI 23.13 says:

Lists aren’t one of those four types, but it’s easy to think of a table of lists of numbers as only “containing” numbers, so the wording could be clarified. You could submit a documentation bug. Probably you could also submit a feature request to allow lists of “safe” data (and so on recursively), since those are also safe, i.e. can be (de)serialized without loss of information.

Done.

http://inform7.com/mantis/view.php?id=1944