Skip to content

Commit ec17e3c

Browse files
committedMar 31, 2016
Fix expression "if" documentation
1 parent b3edfa8 commit ec17e3c

File tree

1 file changed

+11
-10
lines changed
  • resources/function_help/json

1 file changed

+11
-10
lines changed
 

‎resources/function_help/json/if

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
"type": "function",
44
"description": "Tests a condition and returns a different result depending on the conditional check.",
55
"arguments": [
6-
{"arg":"condition","description":"the condition which should be checked"},
7-
{"arg":"result_when_true","description":"the result which will be returned when the condition is true or another value that does not convert to false."},
8-
{"arg":"result_when_false","description":"the result which will be returned when the condition is false or another value that converts to false like 0 or ''. NULL will also be converted to false."}
6+
{"arg":"condition","description":"the condition which should be checked"},
7+
{"arg":"result_when_true","description":"the result which will be returned when the condition is true or another value that does not convert to false."},
8+
{"arg":"result_when_false","description":"the result which will be returned when the condition is false or another value that converts to false like 0 or ''. NULL will also be converted to false."}
99
],
10-
"examples": [ { "expression":"if( 1+1=2, 'Yes', 'No' )", "returns":"'Yes'"},
11-
{ "expression":"if( 1+1=3, 'Yes', 'No' )", "returns":"'No'"}
12-
{ "expression":"if( 5 > 3, 'One', 'Not One' )", "returns":"'One'"}
13-
{ "expression":"if( '', 'It is true (not empty)', 'It is false (empty)' )", "returns":"'It is false (empty)'"}
14-
{ "expression":"if( ' ', 'It is true (not empty)', 'It is false (empty)' )", "returns":"'It is true (not empty)'"}
15-
{ "expression":"if( 0, 'One', 'Zero' )", "returns":"'Zero'"}
16-
{ "expression":"if( 10, 'One', 'Zero' )", "returns":"'One'"}
10+
"examples": [
11+
{ "expression":"if( 1+1=2, 'Yes', 'No' )", "returns":"'Yes'"},
12+
{ "expression":"if( 1+1=3, 'Yes', 'No' )", "returns":"'No'"},
13+
{ "expression":"if( 5 > 3, 1, 0)", "returns":"1"},
14+
{ "expression":"if( '', 'It is true (not empty)', 'It is false (empty)' )", "returns":"'It is false (empty)'"},
15+
{ "expression":"if( ' ', 'It is true (not empty)', 'It is false (empty)' )", "returns":"'It is true (not empty)'"},
16+
{ "expression":"if( 0, 'One', 'Zero' )", "returns":"'Zero'"},
17+
{ "expression":"if( 10, 'One', 'Zero' )", "returns":"'One'"}
1718
]
1819
}

0 commit comments

Comments
 (0)
Please sign in to comment.