Syntax Help: init array from procedure (please)
X-Relay-Info: Relayed through cs.bham.ac.uk NEWS->MAIL gateway
Forwarded from non-member of pop-forum
From: nospam@leegoddard.com (Lee Goddard)
Subject: Syntax Help: init array from procedure (please)
Date: 22 Dec 2002 02:43:43 -0800
Organization: http://groups.google.com/
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
|