|
Boost-Build : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-07-02 16:05:44
I used to wonder if there was any point in having this container module,
but this is really cool. Thanks, Rene: I have needed deep structures like
this several times and have had to resort to perversions in order to get
the job done. This will make things much better!
-Dave
----- Original Message -----
From: "Rene Rivera" <grafik666_at_[hidden]>
To: <jamboost_at_[hidden]>
Sent: Tuesday, July 02, 2002 4:47 PM
Subject: Re: [jamboost] container.jam question
> [2002-07-02] Rene Rivera wrote:
>
> >[2002-07-02] Rene Rivera wrote:
> >>[2002-07-02] Vladimir Prus wrote:
> >>Hmmm... How about extending the "at" accessor to allow the
dereferencing
> >>directly like so:
> >>
> >>ECHO [ $(l).at 0 : 1 ] ; # >> 2
> >>
> >>That seems as simple a syntax, also looks like multi-dimensional arrays
> :-)
> >
> >One other thought if that doesn't seem apporpriate for what you need...
to
> >do the unwrapping I'd add another accessor like this:
> >
> >l0 = [ $(l).get-at 0 ] ;
> >ECHO $(l0[1]) ;
> >
> >A better name than "get-at" would be good though.
>
> OK, both are implemented and tested now :-)
>
> Couldn't think of a better name than get-at.
>
> The "multi-dimensional" access is implemented on both the "at" and
"get-at"
> accessors so this is possible:
>
> l = [ new list [ new list 1 2 3 [ new list a b c [ new list x y z ] ] ] ]
;
> ECHO [ $(l).get-at 4 : 4 ] ; # >> x y z
> ECHO [ $(l).at 4 : 4 : 2 ] ; # >> y
>
>
> -- grafik - Don't Assume Anything
> -- rrivera_at_[hidden] - grafik_at_[hidden]
> -- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]
>
> To unsubscribe from this group, send an email to:
> jamboost-unsubscribe_at_[hidden]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk