[chuck-users] a few language questions

Kassen signal.automatique at gmail.com
Sat Nov 10 08:08:23 EST 2007

On Nov 10, 2007 2:45 AM, Ge Wang <ge at ccrma.stanford.edu> wrote:

> Definitely an essential feature.  Dynamic/resizable arrays are currently
> not in the language, but we recently implemented it in ChucK and are
> currently in the testing phase.  Most likely it will be in the next
> release.
Ha! New address, all settled in? :-)

If you remember a while back I had some questions about the .cap() of
multi-dimensional arrays? Well, back then I did some poking around and it
seems we sorta kinda do have resizable arrays;

int foo[8];

1 => foo[1];

<<<foo.cap()>>>; //should be 12

//now for the bad news
<<<foo[1]>>>; //will be zero, sadly

So, with a garbage-generating copy to a temporary array inbetween we could
re-size arrays right now (that's not to say I wouldn't love a "real"
implementation too)

Not on my home compur(s) couldn't couldn't test but this should run.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20071110/eaa76e4f/attachment.htm 

More information about the chuck-users mailing list