Thread:Extension talk:ParserFunctions/Suggestion: new function ifnot/reply (13)


 * NOT &mdash;  works just fine, and there is no reason add an ifnot.
 * NOT &mdash;  or   where   is a template that will allow multiple inputs and return true if all inputs are true or false if one is false.
 * As you said, OR is easy, but what about XOR? Since it is a much more complicated example, that could be done with a template as well .  Both of the AND and XOR templates if created are generic enough that they might benefit from being coded in Lua (Scribunto) which would easily allow infinite parameters to be passed.  The current request here for a ifnot is too easily done with what is existing, and the request for an ifand is too limited in scope only allowing two arguments to be tested and would be much better resolved with a module allowing infinite and then the parser only has to test for one true or false based on the return of the module.  Similar for my suggested XOR module, it wouldn't work well as a parser function but would be a great Scribunto default module (they would even make great intro to Lua tutorial modules).