共用方式為


Logical.FromText

語法

 
Logical.FromText(text as nullable text) as nullable logical

關於

從文字值 text 建立邏輯值 ("true" 或 "false")。 若 text 包含不同字串,則會擲回例外狀況。 文字值 text 不區分大小寫。

範例 1

從文字字串 "true" 建立邏輯值。

使用方式

Logical.FromText("true")

輸出

true

範例 2

從文字字串 "a" 建立邏輯值。

使用方式

Logical.FromText("a")

輸出

[Expression.Error] Could not convert to a logical.