From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-06-04 16:51:39
Jonathan Turkanis wrote:
> Among other thing, I realized I don't really know how to return a value from a
> Jam rule.
> I just discovered that the return statement does not seem to prevent control
> from continuing past the "if" block to the line marked "...".
> I really have no idea what's going on here.
It's simple ;-) "return 1 ;" sets the return value to the strings ["1"]
(all values Jam are string lists). When the rule finishes, by getting to
the last statement, the return value is passed back to the caller. So this:
rule x ( )
return 1 ;
return 2 ;
Is equivalent to... in C++:
if ( _X_.size() > 0 )
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
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