User Tools

Site Tools


syntax:functions:ifempty

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
syntax:functions:ifempty [2021/08/16 02:55] craigtsyntax:functions:ifempty [2021/08/16 03:17] (current) craigt
Line 5: Line 5:
 =====Description===== =====Description=====
 This function returns the result of //expression2// if the result of //expression1// is empty.  Otherwise, it returns the result of //expression1//. This function returns the result of //expression2// if the result of //expression1// is empty.  Otherwise, it returns the result of //expression1//.
 +
 +\\ 
 +=====Use cases=====
 +This function can be used as an error handler in cases where an expression could potentially return an empty value.  In such a case, the return value from //expression2// acts as a "safety net" so the process can continue.
  
 \\  \\ 
syntax/functions/ifempty.txt · Last modified: 2021/08/16 03:17 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki