blockly > Block > setOutput
متد ()block.setOutput
تنظیم کنید که آیا این بلوک مقداری را برمی گرداند یا خیر.
امضا:
setOutput(newBoolean: boolean, opt_check?: string | string[] | null): void;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
جدید بولی | بولی | اگر خروجی وجود داشته باشد درست است. |
opt_check | رشته | رشته[] | تهی | (اختیاری) نوع برگشتی یا فهرست انواع برگشتی. تهی یا تعریف نشده در صورت امکان برگرداندن هر نوع (مثلاً متغیر get). |
برمی گرداند:
باطل
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-14 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-14 بهوقت ساعت هماهنگ جهانی."],[[["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"]]