Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create an ‘two dimensional array’ instance with ref-array? #2

Closed
PanYuntao opened this issue Jun 26, 2013 · 2 comments
Closed

Comments

@PanYuntao
Copy link

Hi~ create an array instance with the length automatically determined like this:

var buf = new Buffer(int.size * 3)
int.set(buf, int.size * 0, 5)
int.set(buf, int.size * 1, 8)
int.set(buf, int.size * 2, 0)
var array = IntArray.untilZeros(buf)

How to create an ‘two dimensional array’ instance with ref-array?

@xcodebuild
Copy link

Did you find an answer on this question?Or how to create an ‘array of array’?

@ztamizzen
Copy link

Isn't that just an array of pointers? I.E. the "outer" array just contains pointers to the individual "inner" arrays?
const PtrArray = ArrayType('pointer');
const arrayPtr = new PtrArray(3);
arrayPtr[0] = [1, 2, 3, 4, 5, 6];
...and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants