|
Boost-Build : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-07-02 11:09:39
[2002-07-02] Vladimir Prus wrote:
>
>I want to write a rule which returns a pair of lists. Looking at
>container.jam, it is not obvious how to do it. Rene, can you suggest
>something -- now it looks like one cannot use ordinary jam lists as
elements
>of "list" class. I'd like to be able to:
>
> l = new list ;
> $(l). push-back 1 2 3 4 5 ;
> $(l).push-back 1 2 3 ;
That should mostly work, but yes it will produce only one list, ( 1 2 3 4 5
1 2 3).
What you want is this instead...
l = [ new list ] ;
$(l).push-back [ new list 1 2 3 4 5 ] ;
$(l).push-back [ new list 1 2 3 ];
Getting at subelements is bit tricky, but jam doesn't have an easy way :-(
l0 = [ $(l).at 0 ] ;
ECHO [ $(l0).at 0 ] ; # >> 1
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]
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