I've been trying to make a program that can create an arbitrary number of lists as it needs them so that I can store information about an infinitely expansive world, generated as the player explores it (think Dwarf Fortress type exploration). I needed a 2-d storage method more effective than a matrix, and I found myself thinking "If only I could store a list inside a list…"
I got to thinking, and I came up with an extremely promising-looking solution.
Something like this:
:[some number]→X //which list you want to call/create :X→Str1 //use one of the number to string routines :"∟θ"+Str1→v //"∟θ" because list names must start with a letter You now have something like ∟θ1 or ∟θ94 stored to v. Just check if the list exists already or not, if not then create it.
My world is going to be divided into screen-sized cells with coordinates (a,b)
"a" will tell the calc which list to look in, "b" will tell it which entry to look at, and I can store all the information I need about the location in a single number with base 10 compression (each digit represents a state of some variable).
I just thought the idea of the calc making its own lists was pretty darn cool, and it definitely has some applications. Clean up would be a little lengthy, though…
In addition, I had a question: in your experience, how many reasonably-sized lists can the calculator hold before it just can't take any more? Hopefully it's not a limit the user will approach any time soon.
Also… don't do "v"→v, then call v; it's not pretty.