blockly > Block > setOutput
Block.setOutput() 方法
設定這個區塊是否會傳回值。
Signature:
setOutput(newBoolean: boolean, opt_check?: string | string[] | null): void;
參數
參數 |
類型 |
說明 |
newBoolean |
布林值 |
如果有輸出內容,則為 True。 |
opt_check |
string | string[] | null |
(選用) 傳回類型或傳回類型清單。如果可以傳回任何類型 (例如變數取得),則為空值或未定義。 |
退貨:
void
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-30 (世界標準時間)。
[null,null,["上次更新時間:2024-11-30 (世界標準時間)。"],[[["The `setOutput` method determines if a block produces a value or not."],["It takes a boolean argument (`newBoolean`) indicating the output status and an optional `opt_check` for specifying the output type(s)."],["Calling `setOutput` does not return any value (void)."]]],[]]