Hi,

On Tue, 2003-01-21 at 08:59, Torben Nehmer wrote:
> > &(var->attr); and &(var[index]);
> 
> &(var.attr); still works too, and is also the preferred format at least
> for Midgard 1.4.4. I'm not sure if the arrow-Syntax even works to be
> honest.
> 

I don't agree on the phrase 'preferred format'. As far as I recall the
new syntax was introduced to ease the job of the preparser. Even if the
preparser isn't in common use right now, the newer syntax is faster.

In my opinion we should start advertising the new syntax as the prefered
one, even if we support the old syntax forever.

As to what works an what not:

$array['one'] = "test"
$array['one']['two'] = "test"
$object->one = "test"
$object->one->two = "test"
$array['object']->one = "test"
$object->array['one'] = "test"

working:

&(array.one); &(array[one]); &(object.one); &(object->one);

not working:

&(array.one.two); &(array[one][two]); &(object.one.two);
&(object->one->two); &(array.object.one); &(array[object]->one);
&(object.array.one); &(object->array[one]);

So, the newer syntax supports the same scope of variables the old syntax
does.

I personally think it is a shame that neither syntax supports
multi-dimensional variables, but that is a different issue.

wkr,
 
-- 
Envida                     http://www.envida.net/
Armand A. Verstappen       Graadt van Roggenweg 328
[EMAIL PROTECTED]       3531 AH Utrecht
tel: +31 (0)30 298 2255    Postbus 19127
fax: +31 (0)30 298 2111    3501 DC Utrecht

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to