แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > Block > setOutput
เมธอด Block.setOutput()
ตั้งค่าว่าบล็อกนี้จะแสดงผลค่าหรือไม่
ลายเซ็น:
setOutput(newBoolean: boolean, opt_check?: string | string[] | null): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
newBoolean |
บูลีน |
จริง หากมีเอาต์พุต |
opt_check |
string | string[] | null |
(ไม่บังคับ) ประเภทที่แสดงหรือรายการประเภทที่แสดง Null หรือ undefined หากระบบแสดงผลประเภทใดก็ได้ (เช่น get ของตัวแปร) |
การคืนสินค้า:
โมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-30 UTC
[null,null,["อัปเดตล่าสุด 2024-11-30 UTC"],[[["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)."]]],["The `Block.setOutput()` method determines if a block returns a value. It accepts a boolean `newBoolean`: `true` indicates an output exists, `false` otherwise. An optional `opt_check` parameter specifies the type or types returned, using a string or string array. If `null` or `undefined`, any type is acceptable. The method's return type is `void`. The key actions are setting and defining the parameters of a block's output status and its type.\n"]]