User Tools

Site Tools


syntax:functions:if

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:if [2021/08/11 14:20] – [Remarks] dmitrysyntax:functions:if [2021/08/16 02:42] (current) – [Examples] craigt
Line 25: Line 25:
 =====Examples===== =====Examples=====
  
-  if(2+2=4, "Yes it does", "No it doesn't""Yes it does"  //Returns the text value. +  if(2+2=4, "Yes it does", "No it doesn't"//Returns "Yes it does" 
-  if("This" = "That", 1, 0) = 0  //Returns numeric zero. + 
-  if(rem(4,2)=0,"Number is even","Number is odd""Number is even"  //Using a function in the condition. +  if("This" = "That", 1, 0) //Returns 0  (Returns a numeric zero.
-  if({MyVal}+6=8,"MyVal is 2","MyVal is not 2""MyVal is not 2"  //Where "MyVal" = 3, parameters are supported.+ 
 +  if(rem(4,2)=0,"Number is even","Number is odd"//Returns "Number is even"  (Using a function in the condition.
 + 
 +  if({MyVal}+6=8,"Is 2","Is not 2"//Returns "Is not 2"  (Where "MyVal" = 3, parameters are supported.
 \\  \\ 
 ====Nested if()s==== ====Nested if()s====
syntax/functions/if.txt · Last modified: 2021/08/16 02:42 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki