At 11:25 AM +0100 9/18/02, Graham Barr wrote:
>On Wed, Sep 18, 2002 at 10:15:20AM +0200, Dan Sugalski wrote:
>> I've been thinking that we do need to have an extra flag to note
>> whether a key element should be taken as an array or hash lookup
>> element. The integer 1 isn't quite enough, sinc
On Wed, Sep 18, 2002 at 10:15:20AM +0200, Dan Sugalski wrote:
> I've been thinking that we do need to have an extra flag to note
> whether a key element should be taken as an array or hash lookup
> element. The integer 1 isn't quite enough, since someone may have
> done a %foo{1} and we only ha
Dan Sugalski wrote:
> At 9:03 AM +0200 9/16/02, Leopold Toetsch wrote:
>> In PASM they look the same. But as Dan stated, and as tried to show in
>> my answer to Graham, the lookup succeeds only if the nested PMCs are
>> all of the correct type. This works now because an array doesn't
>> suppo
At 9:03 AM +0200 9/16/02, Leopold Toetsch wrote:
>Ken Fox wrote:
>
>>Dan Sugalski wrote:
>
>>>On lookup. The aggregate being queried by key is responsible for
>>>complaining if the key its passed is something that it doesn't
>>>like.
>>
>>
>>If %h{"a"}[0][1] is a PASM P2["a";0;1], then what is %
Dan Sugalski wrote:
> At 9:51 AM +0200 9/13/02, Leopold Toetsch wrote:
>
>> and is a perl6 %h{"a"}[0][1] a PASM P2["a";0;1]?
>
> Yes.
Fine, thought so too, thanks for your quick answer.
I have already a patch for it, I'll make an entry in t/pmc/perlhash.t too.
_But_:
What about all these bo
At 9:51 AM +0200 9/13/02, Leopold Toetsch wrote:
>The same system with a PerlHash doesn't:
[Snip]
>So the question arises to the syntax gurus, should it work like this?
Yes.
>and is a perl6 %h{"a"}[0][1] a PASM P2["a";0;1]?
Yes.
--
Dan
--
Let's first compare with a PerlArray:
(following snippet is from an imcc test file, in PASM syntax)
new P1, .PerlArray
new P0, .PerlArray
set P1[0], P0
set P0[1], 2
set I0, P1[0;1]
print I0=> 2
i.e. "P1[0;.." returns an array PMC, which, indexed by key_next, gives
the