[slang-users] foreach in one array dimension

John E. Davis davis at space.mit.edu
Sat Jun 3 18:45:47 EDT 2006


Jörg Sommer <joerg at alea.gnuu.de> wrote:
>g([ ["foo"], ["foo"] ]);

This does not define an array of two arrays.  Rather, it defines an
array of String_Type[2].  If you want an array of arrays, then you
will have to explicitely create it:

    a = Array_Type[2];
    a[0] = ["foo"];
    a[1] = ["bar"];

--John




More information about the slang-users-l mailing list