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

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


en:documentation:conditions

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слеваПредыдущая версия
Следующая версия
Предыдущая версия
en:documentation:conditions [2020/04/06 14:21] loopbacken:documentation:conditions [2020/04/24 16:30] (текущий) loopback
Строка 4: Строка 4:
  
 <code> <code>
-If [Not] <expression 1> Then+If <expression 1> Then
   ...   ...
-ElseIf [Not] <expression 2> Then+ElseIf <expression 2> Then
   ...   ...
 Else Else
Строка 13: Строка 13:
 </code> </code>
  
-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 numericthen numeric comparison used+In conditions, you can use any valid [[expressions|expression]], the result of which is equal to “true” or “false”. For true, a string equal to "1" is takenfor a false - "0" or an empty string.
  
-Variables are always expanding in the expressions. If you assume that variable value can conatin spaceswrap expression in quotes. Example:+Unlike expressions in command parametersan expression in conditions is written without quotes with % sign in front of them:
  
 <code> <code>
-If ("%var_with_spaces%= "value") Then+If %AUTORUN_TCARCH% = 32 Then 
 +  ... 
 +EndIf 
 + 
 +If FileExist("%COMMANDER_PATH%\NoClose.exe") Then 
 +  ... 
 +EndIf
 </code> </code>
  
-Also, some special functions can be used in comparison. In this case comparison limited to only one function.+**Legacy command use**
  
 +In Autorun before version 2.0.10, only certain special functions could be used in conditions, while the condition was limited to one function. In later versions, this option is left for compatibility.
  
 <code> <code>
en/documentation/conditions.txt · Последнее изменение: 2020/04/24 16:30 — loopback

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki