User Tools

Site Tools


syntax:functions:when
no way to compare when less than two revisions

Differences

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


Next revision
syntax:functions:when [2016/06/08 00:19] – created dmitry
Line 1: Line 1:
 +====== when(condition, expression) ======
  
 +Returns the result of //expression// if //condition// is true. Otherwise returns [[syntax:types|empty value]]. This function is effectively a shorthand for '' if(condition, expression, empty()) ''
 +
 +^  Example  ^  Result  ^
 +| when( 2 + 2 = 4, 'Makes sense' | Makes sense  |
 +| when( 1 + 1 = 4, 'Makes sense' |   |
syntax/functions/when.txt · Last modified: 2021/08/28 21:17 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki