Documentation unclear how if(<string>) is handled
The documentation describes:
if(<variable|string>)
True if given a variable that is defined to a value that is not a false constant. False otherwise. (Note macro arguments are not variables.)
This does not explicitly describe how <string>
is handled. The logic for <variable>
appears to be different than that for <string>
as well. For variables, the documented logic above appears to indicate than any defined variable which does not have a false constant value evaluates to True. However, any string argument in an if-statement appears to evaluate to False, if it does not equal one of the defined true constants (e.g. 1
, TRUE
, YES
, etc).
See discussion on Stack Overflow here.