proc |
ID:891677
Jul 26 2012, 7:39 pm
|
|
I was just experimenting a bit and wanted to see if there was a good way to get the size of a multidimensional list. This is what I came up with: Code:
| |
#2 Jul 26 2012, 8:39 pm (Edited on Jul 26 2012, 10:30 pm)
|
||
Actually, I was working on a making a datum to hold a multidimensional list in a single list (because I keep reading that BYOND is bad at multidimensional lists).
This proc was going to be used to help convert a traditional multidimensional list to the new matrix datum. If the list is a jagged list it can't be converted and I would need break out of it. Edit: For clarity this is the islist() proc
| ||
#3 Jul 26 2012, 11:11 pm
|
||||
It seems I may have found a solution although it is a bit recursion happy:
Here is a test:
I am not sure I am happy with all the recursion and all the variables I am creating to test this. Anyone else have any ideas?
| ||||

I have to ask, though, in what context are you working that you can't always control if the list will be a true multidimensional list or not?