Инструменты пользователя

Инструменты сайта


en:documentation:conditions

Это старая версия документа!


Conditional

Here is one and only conditional statement:

If [Not] <expression 1> Then
  ...
ElseIf [Not] <expression 2> Then
  ...
Else
  ...
EndIf

For numeric comparison operator can be one of: =, <>, >, <, >=, ⇐. For string comparison only = and <> allowed, comparison is case insensitive. Allowed brackets and operators AND and OR. If both expressions are numeric, then numeric comparison used.

Variables are always expanding in the expressions. If you assume that variable value can conatin spaces, wrap expression in quotes. Example:

If ("%var_with_spaces%" = "value") Then

Also, some special functions can be used in comparison. In this case comparison limited to only one function.

If [Not] Function1 <parameters> Then
  ...
ElseIf [Not] Function2 <parameters> Then
  ...
Else
  ...
EndIf

It's allowed to use both expressions and function in one condition (but in different branches).

en/documentation/conditions.1547026914.txt.gz · Последнее изменение: 2019/01/09 12:41 — 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki