布尔例程
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)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 左侧 | 真否 | — | |
| 右侧 | 真否 | — |
返回
| 结果 | 真否 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 布尔例程
- 所属包
- 标准库