@if condition @then value if true @else value if false @endif For any types t @if Boolean @then t @else t @endif

Chooses between two expressions depending on whether the condition is true or false. For example, @if score >= 0 @then "Positive" @else "Negative" @endif would check whether the score expression is greater than or equal to zero. If it was, the result would be the "Positive" text; otherwise it would be the "Negative" text.

ExamplesClick an example to insert it
@if 5 >= 0 @then "Positive" @else "Negative" @endif"Positive"
@if "A" = "B" @then 1 @else 0 @endif0