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 revisionBoth sides next revision
syntax:functions:if [2021/08/11 14:20] – [Remarks] dmitrysyntax:functions:if [2021/08/11 14:20] – [Examples] dmitry
Line 26: Line 26:
  
   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") = "Yes it does"  //Returns the text value.
 +  
   if("This" = "That", 1, 0) = 0  //Returns numeric zero.   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(rem(4,2)=0,"Number is even","Number is odd") = "Number is even"  //Using a function in the condition.
 +  
   if({MyVal}+6=8,"MyVal is 2","MyVal is not 2") = "MyVal is not 2"  //Where "MyVal" = 3, parameters are supported.   if({MyVal}+6=8,"MyVal is 2","MyVal is not 2") = "MyVal is not 2"  //Where "MyVal" = 3, parameters are supported.
 \\  \\ 
syntax/functions/if.txt · Last modified: 2021/08/16 02:42 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki