company logo

SWITCH expression in document template

SWITCH expressions in document templates are used for conditional text output with more than one alternative. Instead of writing a computation expression, SWITCH expressions might be more comfortable. A SWITCH expression might be followed by a number of CASE expressions and by an OTHER expression. It must be terminated by an END expression in any case.

$switch sex$\

$case 'female'$\

she\

$case 'male'$}

he\

$other$\

it\

$end$

Definition: 

switch_expr := _dollar _switch operand _dollar