Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0
Syntax
Code Block
languagenone
condition (<boolean expression>, operand1, operand2)
if <boolean expression> then operand1 else operand2
SemanticsReturns operand1 if the <boolean expression> evaluates to true, otherwise operand2 will be returned.
Both syntactic forms are equivalent. Internally, the if statement is mapped to the condition operation.
Substitutablesoperand1, operand2 The operands can be any variable or object attribute, a literal, a boolean or arithmetic expression. Both operands need to return the same type. 
Examples
Code Block
languagenone
set s = condition (b1 and b2, "abc", "xyz"); 
set s = if b1 and b2 then "abc" else "xyz"; 
Assigns "abc" to string s if the expression b1 and b2 evaluates to true, otherwise "xyz" will be assigned to s.
The second statement is equivalent.
rp
Panel
titleRelated Pages: