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 >> support a string as key, while a perlhash doesn't support an int as key. >> >> So the wrong types will produce either "Not a string!" or "Not an >> integer!". > > > 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 have that in as an integer key. There are IMHO 2 solutions for this: - the HL takes care of this, so imcc sees: _HV_foo["1"] - assembler/imcc takes care of this: P0[1] => array, P0{1} => hash and generates a string key for the latter. leo