布林例程
5 個節點
本頁內容 5
與
函數Logical AND (&&). Returns true only if both operands are true.
與(左側: 真否, 右側: 真否) -> 真否
bool And(bool left, bool right)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 左側 | 真否 | — | |
| 右側 | 真否 | — |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 布林例程
- 所屬包
- 標準庫
選擇
函數過載 1/2
選擇(條件: 真否, 為真時: 文字, 為假時: 文字) -> 文字
string Choose(bool condition, string whenTrue, string whenFalse)
One of two texts, by a condition: the ternary operator (condition ? whenTrue : whenFalse).
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 條件 | 真否 | — | |
| 為真時 | 文字 | — | |
| 為假時 | 文字 | — |
返回
| 結果 | 文字 |
備註
Typed overloads rather than the obsolete LogicRoutines.Choose(bool, object, object), which
answered object and so could not feed a typed pin. A choice made by DATA is what keeps a
procedural callback one chain where a Branch - which does not rejoin - would repeat every statement
after the choice once per arm.
過載 2/2
選擇(條件: 真否, 為真時: 數字, 為假時: 數字) -> 數字
double Choose(bool condition, double whenTrue, double whenFalse)
One of two numbers, by a condition: the ternary operator (condition ? whenTrue : whenFalse).
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 條件 | 真否 | — | |
| 為真時 | 數字 | — | |
| 為假時 | 數字 | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 布林例程
- 所屬包
- 標準庫
非
函數Logical NOT (!). Inverts the boolean value.
非(值: 真否) -> 真否
bool Not(bool value)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 值 | 真否 | — |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 布林例程
- 所屬包
- 標準庫
或
函數Logical OR (||). Returns true if at least one operand is true.
或(左側: 真否, 右側: 真否) -> 真否
bool Or(bool left, bool right)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 左側 | 真否 | — | |
| 右側 | 真否 | — |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 布林例程
- 所屬包
- 標準庫
邏輯異或
函數Logical exclusive OR (XOR). Returns true if exactly one operand is true.
邏輯異或(左側: 真否, 右側: 真否) -> 真否
bool Xor(bool left, bool right)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 左側 | 真否 | — | |
| 右側 | 真否 | — |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 布林例程
- 所屬包
- 標準庫