From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-09-09 00:42:58
K. Noel Belcourt wrote:
> I want to initialize a constant using a command line value if one is
> supplied by the user or with some default of my choosing if no
> argument is supplied. Something like this though clearly this is
> illegal since you can't change a constant.
> constant sierra-root = [ MATCH "^--sierradir=(.*)" : $(argv) ] ;
> sierra-root ?= /sierra/Release ;
> So how can I initialize a constant in one step, either with a value
> from the command line or with some specified default value.
You can't do it in one assignment if that's your question. What you
have, except for the "constant", seems fine to me. Is there some reason
you need to do it in one assignment?
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
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