Home
About
Policies
FAQ
Forums
Registration
Password Recovery

If (MPI)

From Tapestries MUCK

(Difference between revisions)
Jump to: navigation, search
(added another example)
 
Line 9: Line 9:
If there is no false argument, and 'check' evaluated false, then it returns a null string.
If there is no false argument, and 'check' evaluated false, then it returns a null string.
-
Example:
+
Examples:
<mpi>Your computer is {if:{eq:2,3},broken!,all right.}</mpi>
<mpi>Your computer is {if:{eq:2,3},broken!,all right.}</mpi>
 +
<mpi>{if:{eq:{awake:{owner:this}},1},awake,asleep}</MPI>

Latest revision as of 21:50, 24 April 2007

if

{if:check,true}
{if:check,true,false}

This is a simple conditional command. It evaluates the 'check' argument and if it is true, then it evaluates the 'true' argument and returns it's result.

If 'check' does not evaluate as true, then it will evaluate the 'false' argument, if there is one, and returns it's result.

If there is no false argument, and 'check' evaluated false, then it returns a null string.

Examples:

Your computer is {if:{eq:2,3},broken!,all right.}

{if:{eq:{awake:{owner:this}},1},awake,asleep}
Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox