6

Closed

Multi-Dimensional Array Support

description

Will this be added soon?
I need 2D and 3D arrays to render 2D/3D images.
 
Thanks
Closed Jun 22, 2012 at 1:25 PM by kudzu
Feature for future. Please use tracker just for current bugs.

comments

anthonywolfe wrote Oct 31, 2009 at 1:24 AM

I would love this because most of my knowledge leads me to the Multi-Dimensional array not supported error.

ch2845 wrote Dec 16, 2009 at 12:00 AM

this would be great because i was working on using a 2D array to render the entire screen. i got a really odd output when i tried to run it though. it was definitely not expected and for some reason a little smiley face popped up in the corner (i didn't know the bios supported smiley's :-)).

acornalert wrote Jan 20, 2010 at 9:39 PM

You can work around this (I encountered this when messing around with VGA layers). Basically you create a function which maps your two dimensions onto a single dimension, so instead of int[x,y], you do something like int[get_index[x,y]] and so-on. It gets a little tricky beyond three dimensions, but it is quick for two dimensional arrays.

OR

You can use lists, which are slower, but you can hold as much as you want.

You might also be able to hold arrays within arrays, but I didn't try this (only started playing with it this afternoon.)