[chuck-users] reference sub-sections of multi-dimensional arrays

Kassen signal.automatique at gmail.com
Wed Apr 30 03:21:47 EDT 2008


2008/4/29 eli queen <eli at sleepingweather.com>:

> hi all ... this is my first post to the list. so, as you would guess, i'm
> new to chuck.
>

Hi, Eli!

this will assign i[] as values of column i(1), but is there a way w/o the
> function?
>
>
I think this is the core question, right? I don't think so, I think you need
a function. The thing is that 2d arrays can be seen as a "array of arrays"
or a array where every element is a array as well. Returning one element (a
1d array) is easy but returning a element from every element is more
complicated and hence needs a function.

There is, BTW, a real difference between "assignment" and copying a array
element by element, your function here copies.

Hope that clarifies things a bit?

Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080430/17522983/attachment.html>


More information about the chuck-users mailing list