You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically, all of these are already supported as a standard #ifexpr supports all of these. That said, it can be cleaner (read, less messy) to support AND/OR within the conditions themselves. I'm not sure how helpful a switch would be as shown below. Consider the following:
// ANDif(condition1&&condition2){// Do something}// Is equal toif(condition1){if(condition2){// Do something}}// ASB equivalent{{#ifexpr: condition1 |{{#ifexpr: condition2 |/* Do something */}}}}
// ORif(condition1||condition2){// Do something}// Is equal toif(condition1){// Do something}else{if(condition2){// Do something}}// ASB equivalent{{#ifexpr: condition1 |/* Do something */|{{#ifexpr: condition2 |/* Do something */}}}}
// SWIITCHswitch(object){case equality1:// Do something1break;case equality2:// Do something2break;}// Is equal toif(object== equality1){// Do something1}
else
{if(object==equality2){// Do something2}}// ASB Equivalent{{#ifexpr:object==equality1|/* Do something1 */|{{#ifexpr:object==equality2|/* Do something2 */}}}}
Please consider implementing support for complex conditionals, allowing to chain 2 or more statements.
AND, OR, SWITCH
The text was updated successfully, but these errors were encountered: