[chuck-users] sociative polydimenional arrays
Kassen
signal.automatique at gmail.com
Tue Nov 21 12:00:10 EST 2006
Hi list, some more arrays for fun and (potential?) profit....
//this goes well;
int foo[8];
3 => foo[0];
5 => foo["test"];
//let's make sure
<<< foo[0] >>>;
<<< foo["test"] >>>;
//that was fun!
//lets do it again in 2D!
//fine
int bar[3][8];
//fine
3 => bar[0][0];
//not so fine
5 => bar[0]["test"];
//we never get here
<<< foo[0][0] >>>;
<<< foo[0]["test"] >>>;
Why is this? Is this a bug? Missing feature? Complete misunderstanding of
how to combine polydimentional arrays and sociative-ness?
ChucK claims foo goes out of bounds but I suspect it's either a bug or a
syntax error because frankly I can't see how I could prevent
5 => bar[0]["test"]; from going out of bounds.
Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20061121/96b817fe/attachment.htm
More information about the chuck-users
mailing list