[chuck-users] arrays holding arrays?
gewang at CS.Princeton.EDU
Fri Aug 4 14:04:01 EDT 2006
> I have a slight issue. I'd like to have a array in which every object
> itself is a array. Particularly I'd like to have one of 8 locations
> each of which holds a array of length 32.
> I tried this;
> int memory;
You should be able to do this using a two dimensional array:
You can treat this as a matrix or as an array of array. To get the 0th
Should be of type int :
memory @=> int array;
You can do this up to arbitrary dimensions, just make sure the
add up (the type checker shall complain if they don't).
Hope this helps.
More information about the chuck-users