[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Dec 22 02:43:43 2002 
Subject:Syntax Help: init array from procedure (please) 
From:Lee Goddard 
Volume-ID:1021222.02 

Hello there,

Been a while since I read any POP-11, and don't have a copy
of the language at hand, but am working throught the Sussex
TEACHVISION files in Perl ....

Anyway, the third in the series has this:

    vars gmask_2d;
    newarray([% -gsize, gsize, -gsize, gsize %],
        procedure(x, y); lvars x, y;
            gmask(x) * gmask(y)
        endprocedure) -> gmask_2d;

Aside from the wonder of negative-indexed arrays, could someone
please explain to me what is going on with this?  It seems to
be that that gmask_2d array is initialised with the values of
the procedure(x,y), but I can't understand where (x,y) come from.

Is it a feature of the language that they will be supplied by 
the interpreter as the array is initialised?

Any help much appreciated
lee