# Unless

unless 前置詞及後置詞用於建立條件式子句，其可決定是否應該評估陳述式或結束子句。其可視為完整 if..end if 陳述式的精簡替代項目。

語法：

(Unless condition statement | exitstatement Unless condition )

只有在 condition 評估為 False 時，才會執行 statement 或 exitstatement。

unless 前置詞可用在已有一或數個其他陳述式的陳述式上，包含其他 unless 或 when 前置詞。

引數：

Unless 引數

| 引數 | 描述 |
| --- | --- |
| condition | 評估為 True 或 False 的邏輯運算式。 |
| statement | 除了控制陳述式之外的任何 QlikView 指令碼陳述式。 |
| exitstatement | exit for、exit do 或 exit sub 子句，或者 exit script 陳述式。 |

範例：

`exit script 
 unless A=1;` `unless A=1 
 LOAD  * from myfile.csv;` `unless A=1 
 when B=2 drop table Tab1;`