At 10:24 PM +0100 8/1/02, Graham Barr wrote:
>On Thu, Aug 01, 2002 at 02:11:27PM -0700, Stephen Rawls wrote:
>> > It should pass them on to the PMC directly, which
>> > should then handle them properly.
>>
>> So, if ix < -SELF->cache.int_val then the code tries
>> to use a negative value to access the array element in
>> the C code. This is obviously wrong. My question is
>> should this raise an internal exception, or should
>> there be some DWIMery inside PerlArray.pmc.
>
>Well in perl today.
>
> print $a[-2];
>
>just gives undef and @a is unchanged
>
> $a[-2] = 1;
>
>dies with
>
>Modification of non-creatable array value attempted, subscript -2 at
>-e line 1.
>
>But it seems to me that parrot has not concept of lvalue/rvalue use
>when fetching an element from an aggregate.
Not with fetching, no. The second example would be something like:
set P0[-2], 1
in assembly.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk