[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: new flag? wml -U

Hi Denis

On 27-Aug-01 Denis Barbier wrote:
> On Thu, Aug 16, 2001 at 04:18:44PM +0200, Jan Holler wrote:
>> I suggest to implement a flag -U to undefine previously with
>> -D defined variables.

>> <if <var-exists BAR>
>> <set-var newbar=<get-var bar>>           # or $(BAR) instead of <get-var bar>
>> <set-var newbar=$(WML_SRC_BASENAME)>
>> >

> problem is that wml has then to distinguish between
>   -D foo=bar -U foo
> and
>   -U foo -D foo=bar
> which is not trivial.

Regard the order: last flag wins over earlier flags from the 
left to the right (.wmlc -> top down). Would that still be 
complicated to implement in the "command-line"-parsing?

> IMO it is always possible to unset a variable by making it empty,
> and replace your test by <if <get-var BAR> ...

Thanks. That would work around. But needs some
extra effort (need to unset it in every file or make
global changes in some include-file) and is IMHO not 
that flexible as the described '-U'. (speaking of
global and hierarchical settings).


Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com