turn array into something else

BlitzMax Forums/BlitzMax Beginners Area/turn array into something else

slenkar(Posted 2008) [#1]
bruceys serialization module doesnt support 2d arrays (because reflection doesnt support them either)

it supports other data structures though, what would be a good way to change a 2d array into another form of data?


tonyg(Posted 2008) [#2]
ListfromArray?


Beaker(Posted 2008) [#3]
Changing a 2D array into a 1D array is fairly simple.


slenkar(Posted 2008) [#4]
listfromarray only works on 1d arrays

whats the simplest way to convert the array to 1d?


tonyg(Posted 2008) [#5]
Make a 2D array and then loop through the 2D array passing each index into the 1D array. Then use listfromarray.


slenkar(Posted 2008) [#6]
ok thanks


Sledge(Posted 2008) [#7]
You may as well make and fill the list as make and fill the 1D array!