2015-06-11 12:02:27 +10:00
|
|
|
{
|
2015-09-20 17:12:43 +02:00
|
|
|
"name": "if",
|
|
|
|
"type": "function",
|
2015-06-11 12:02:27 +10:00
|
|
|
"description": "Tests a condition and returns a different result depending on the conditional check.",
|
2015-09-20 17:12:43 +02:00
|
|
|
"arguments": [
|
|
|
|
{"arg":"condition","description":"the condition which should be checked"},
|
|
|
|
{"arg":"result_when_true","description":"the result which will be returned when the condition is True"},
|
|
|
|
{"arg":"result_when_false","description":"the result which will be returned when the condition is False"}
|
2015-06-11 12:02:27 +10:00
|
|
|
],
|
|
|
|
"examples": [ { "expression":"if( 1, 'One', 'Not One' )", "returns":"'One'"},
|
|
|
|
{ "expression":"if( 8, 'One', 'Not One' )", "returns":"'Not One'"}
|
|
|
|
]
|
|
|
|
}
|