Closures are self-contained blocks of functionality that can be passed การแปล - Closures are self-contained blocks of functionality that can be passed ไทย วิธีการพูด

Closures are self-contained blocks

Closures are self-contained blocks of functionality that can be passed around and used in
your code. Closures in Swift are similar to blocks in C and Objective-C and to lambdas in
other programming languages.
Closures can capture and store references to any constants and variables from the
context in which they are defined. This is known as closing over those constants and
variables, hence the name “closures”. Swift handles all of the memory management of
capturing for you.
N O T E
Don’t worry if you are not familiar with the concept of “capturing”. It is explained in detail below in Capturing Values.
Global and nested functions, as introduced in Functions, are actually special cases of
closures. Closures take one of three forms:
Swift’s closure expressions have a clean, clear style, with optimizations that encourage
brief, clutter-free syntax in common scenarios. These optimizations include:




0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
ปิดบล็อกอยู่ในตัวเองของฟังก์ชันที่สามารถผ่านรอบ และใช้
รหัสของคุณ ปิดใน Swift มีคล้ายบล็อก C และวัตถุประสงค์-C และ lambdas ใน
อื่น ๆ โปรแกรมภาษา.
ปิดสามารถจับภาพ และเก็บไว้อ้างอิงมีค่าคงที่และตัวแปรจาก
บริบทจะกำหนดได้ นี้เรียกว่าปิดเกินค่าคงที่ และ
ตัวแปร ดังนั้นชื่อ "ปิด" Swift จัดการทั้งหมดของการจัดการหน่วยความจำของ
จับคุณ
N O T E
ดอนไม่ต้องกังวลหากคุณไม่คุ้นเคยกับแนวคิดของการ "จับ" มีคำอธิบายในรายละเอียดด้านล่างใน Capturing ค่า
สากลและฟังก์ชันซ้อน ฟังก์ชัน การแนะนำอยู่จริงกรณีของ
ปิด ปิดใช้หนึ่งแบบฟอร์ม 3:
ความสะอาด ล้างสไตล์ เพิ่มประสิทธิภาพที่มีนิพจน์ของ Swift ปิด
ไวยากรณ์ย่อ ปราศจากความไม่เป็นระเบียบในสถานการณ์ทั่วไป เพิ่มประสิทธิภาพเหล่านี้รวมถึง:


การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
Closures are self-contained blocks of functionality that can be passed around and used in
your code. Closures in Swift are similar to blocks in C and Objective-C and to lambdas in
other programming languages.
Closures can capture and store references to any constants and variables from the
context in which they are defined. This is known as closing over those constants and
variables, hence the name “closures”. Swift handles all of the memory management of
capturing for you.
N O T E
Don’t worry if you are not familiar with the concept of “capturing”. It is explained in detail below in Capturing Values.
Global and nested functions, as introduced in Functions, are actually special cases of
closures. Closures take one of three forms:
Swift’s closure expressions have a clean, clear style, with optimizations that encourage
brief, clutter-free syntax in common scenarios. These optimizations include:




การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
ฝาปิดเป็นแบบบล็อกของฟังก์ชันที่สามารถผ่านรอบ และใช้ใน
รหัสของคุณ ปิดใน Swift คล้ายกับบล็อกใน C และภาษาอ็อบเจกทีฟ - ซี และ lambdas ในการเขียนโปรแกรมภาษาอื่น ๆ
.
ปิดสามารถจับภาพและเก็บค่าคงที่และตัวแปรอ้างอิงจาก
ในบริบทที่พวกเขาจะกำหนด นี้เป็นที่รู้จักกันเป็นค่าคงที่และตัวแปรเหล่านั้นปิดมากกว่า
,ดังนั้นชื่อ " ปิด " รวดเร็วจับทั้งหมดของหน่วยความจำการจัดการ
จับสำหรับคุณ .
o n t e
ไม่ต้องกังวลถ้าคุณไม่คุ้นเคยกับแนวคิดของ " จับ " มันอธิบายในรายละเอียดด้านล่างในการจับค่า
ฟังก์ชันทั่วโลกและซ้อนกัน ตามที่แนะนำในหน้าที่ เป็นกรณีพิเศษ
ปิด . ปิดใช้หนึ่งในสามรูปแบบ :
รวดเร็วปิดการแสดงออกมีลักษณะใส สะอาด ด้วยการเพิ่มประสิทธิภาพที่ให้กำลังใจ
สั้นถ่วงฟรีไวยากรณ์ในสถานการณ์ทั่วไป การเพิ่มประสิทธิภาพเหล่านี้รวมถึง :




การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2025 I Love Translation. All reserved.

E-mail: