# 操作者

``````// left-hand unary operators
// <operator> <operand>
// operand is an expression

// right-hand unary operators
// <operator> <operand>
// operand is an expression
@{LobbyBeacon.endUserIDs._experience.emailid.id} is not null

// binary operators
// <operand1> <operator> <operand2>
// operand is an expression
``````

## 重要備註

• 使用乘法時(`*`)，則兩個作業欄位都必須有相同的型別，可以是整數或小數。 範例：
• 下列範例是正確的： `3.0 * 4.0`
• `3 * 4.0` 會導致錯誤

## 邏輯

### 和

``````<expression1> and <expression2>
``````

``````3.14 > 2 and 3.15 < 1
``````

### 或

``````<expression1> or <expression2>
``````

``````3.14 > 2 or 3.15 < 1
``````

### 非

``````not <expression>
``````

<expression> 必須為布林值。 結果是布林值。

``````not 3.15 < 1
``````

## 比較

### 為null

``````<expression> is null
``````

``````@{BarBeacon.location} is null
``````

### 不是null

``````<expression> is not null
``````

``````@{BarBeacon.location} is not null
``````

### 具有null

``````<expression> has null
``````

<expression> 必須為清單。 結果是布林值。

``````["foo", "bar", null] has null
``````

``````["foo", "bar", ""] has null
``````

### ==

``````<expression1> == <expression2>
``````

``````3.14 == 42
``````
``````"foo" == "bar"
``````

### !=

``````<expression1> != <expression2>
``````

``````3.14 != 42
``````
``````"foo" != "bar"
``````

### >

``````<expression1> > <expression2>
``````

Datetimeonly可以與Datetimeonly比較。

``````3.14 > 42
``````

### >=

``````<expression1> >= <expression2>
``````

Datetimeonly可以與Datetimeonly比較。

``````42 >= 3.14
``````

### <

``````<expression1> < <expression2>
``````

Datetimeonly可以與Datetimeonly比較。

``````42 < 3.14
``````

### <=

``````<expression1> <= <expression2>
``````

Datetimeonly可以與Datetimeonly比較。

``````42 <= 3.14
``````

## 算術

### +

``````<expression1> + <expression2>
``````

``````1 + 2
``````

### -

``````<expression1> - <expression2>
``````

``````2 - 1
``````

### /

``````<expression1> / <expression2>
``````

<expression2> 不得等於0 （傳回0）。

``````4 / 2
``````

### *

``````<expression1> * <expression2>
``````

``````3 * 4
``````

### %

``````<expression1> % <expression2>
``````

``````3 % 2
``````

## Math

### 是數值

``````<expression> is numeric
``````

``````@ is numeric
``````

### 為整數

``````<expression> is integer
``````

``````@ is integer
``````

### 為小數

``````<expression> is decimal
``````

``````@ is decimal
``````

## 字串

### +

``````<string> + <expression>
``````
``````<expression> + <string>
``````

``````"the current time is " + (now())
``````

``````(now()) + " is the current time"
``````

``````"a" + "b" + "c" + 1234
``````

## 日期

### +

``````<expression> + <duration>
``````

``````(toDateTime("2011-12-03T15:15:30Z")) + (toDuration("PT15M"))
``````

``````(toDateTimeOnly("2011-12-03T15:15:30")) + (toDuration("PT15M"))
``````

``````(now()) + (toDuration("PT1H"))
``````

``````(toDuration("PT1H")) + (toDuration("PT1H"))
``````