Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the pre-processor support $(fun.defined(X)) to return true if variable X is defined #4767

Open
wixbot opened this issue May 19, 2015 · 1 comment

Comments

@wixbot
Copy link

wixbot commented May 19, 2015

It is not currently easy to define a pre-processor condition which includes a block of code if variable A or variable B is defined. For example <?if $(var.A) Or $(var.B) ?> will result in an error unless both A and B are defined.

Adding a new function $(fun.defined(X)) with similar behaviour to the C/C++ pre-processor defined(X) function, would allow more complex conditional tests to be authored. For example:<?if $(fun.defined(A)) Or $(fun.defined(B)) ?> would include a block if either variables A or B are defined.

Note: There is an inconsistency in the pre-processor documentation where some of the <?if...> examples have undefined variables, which would result in a compilation error.

Originally opened by rbradford

@wixbot
Copy link
Author

wixbot commented May 19, 2015

Release set to v4.x

@wixbot wixbot added this to the v4.x milestone Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant