On Sat, Apr 23, 2005 at 10:07:05PM +0200, Juerd wrote:
: Autrijus Tang skribis 2005-04-24 3:58 (+0800):
: > Please sanity-check the following:
: > pugs> my ($x, @a); $x := @a[-1]; $x = 3; @a
: > *** Error: Modification of non-creatable array value attempted
:
: Pass. (For reference: The error is in the second statement.)
:
: > pugs> my ($x, @a); $x := @a[0]<x>[1]<y>; $x = 3; @a[0]<x>[1]<y>
: > 3
:
: Pass.
:
: > pugs> my ($x, @a); $x := [EMAIL PROTECTED]; $x = 3
: > *** Error: Can't modify constant item
:
: Pass, provided that [EMAIL PROTECTED] (@a.elems) is rvalue. If it's lvalue,
then @a
: should grow to 3 elements instead.
rvalue, I think. Extending an array should probably be a special method,
though we might allow
@a.elems = 3;
or some such.
Larry