In languages like Java and C++, each variable must be declared and giv การแปล - In languages like Java and C++, each variable must be declared and giv ไทย วิธีการพูด

In languages like Java and C++, eac

In languages like Java and C++, each variable must be declared and given a type. In Smalltalk, every variable must be declared, but it is not given a type. Smalltalk has an unusual syntax for variable declarations: the variables are simply listed enclosed in vertical bars.
int x, y, z; // Java/C++
| x y z | "Smalltalk"
One might reasonably ask, why bother to declare variables at all, if there is no typing information? The primary answer is that every variable must be declared so that the compiler can set aside space for each variable. Every variable will be allocated 32 bits and can hold either a pointer to an object or a SmallInteger.

A second reason for declaring variables is so that the compiler can guard against misspellings of variable names by the programmer. Every variable must be declared. If, in the body of executable statements, the programmer misspells a variable name, the compiler will complain that the variable has not been declared.
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
ในภาษา Java และ c ++, แต่ละตัวแปรต้องประกาศ และกำหนดชนิดไว้ ในภาษาสมอลล์ทอล์ก ต้องประกาศตัวแปรทุก แต่มันไม่ได้ถูกกำหนดเป็นชนิด ภาษาสมอลล์ทอล์กมีไวยากรณ์ผิดปกติการประกาศตัวแปร: ตัวแปรเพียงอยู่ล้อมรอบในแถบแนวตั้ง int x, y, z Java/c ++ | x y z | "ภาษาสมอลล์ทอล์ก"หนึ่งอาจสมถาม ทำไมต้องยุ่งประกาศตัวแปรเลย ถ้าไม่มีข้อมูลพิมพ์ คำตอบหลักคือ ว่า ต้องประกาศตัวแปรทุกเพื่อให้คอมไพเลอร์สามารถดองพื้นที่สำหรับแต่ละตัวแปร ทุกตัวแปรจะถูกปันส่วน 32 บิต และสามารถเก็บเป็นตัวชี้ไปยังวัตถุหรือ SmallInteger เหตุผลที่สองการประกาศตัวแปรเพื่อให้คอมไพเลอร์สามารถรักษาสะกดผิดชื่อตัวแปรโดยนักเขียนโปรแกรมจะ ต้องประกาศตัวแปรทุก ถ้า เนื้อหาของคำสั่งปฏิบัติ ผู้เขียนโปรแกรมสะกดชื่อตัวแปร คอมไพเลอร์จะบ่นว่า ไม่ได้ประกาศตัวแปร
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
In languages like Java and C++, each variable must be declared and given a type. In Smalltalk, every variable must be declared, but it is not given a type. Smalltalk has an unusual syntax for variable declarations: the variables are simply listed enclosed in vertical bars.
int x, y, z; // Java/C++
| x y z | "Smalltalk"
One might reasonably ask, why bother to declare variables at all, if there is no typing information? The primary answer is that every variable must be declared so that the compiler can set aside space for each variable. Every variable will be allocated 32 bits and can hold either a pointer to an object or a SmallInteger.

A second reason for declaring variables is so that the compiler can guard against misspellings of variable names by the programmer. Every variable must be declared. If, in the body of executable statements, the programmer misspells a variable name, the compiler will complain that the variable has not been declared.
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
ในภาษาเช่น Java และ C แต่ละตัวแปรจะต้องประกาศ และรับพิมพ์ ใน Smalltalk ทุกตัวแปร ต้องประกาศ แต่ก็ไม่ได้ให้พิมพ์ เพิร์ลมีไวยากรณ์ที่ผิดปกติสำหรับการประกาศตัวแปร : ตัวแปรที่เป็นเพียงปรากฏอยู่ในแถบแนวตั้ง .
1 X , Y , Z ; / / Java / C
| X Y Z | " ธ "
1 อาจพอสมควร ถามว่า ทำไมต้องประกาศตัวแปรทั้งหมดถ้าไม่มีพิมพ์ข้อมูล คำตอบคือทุกตัวแปรหลักที่ต้องประกาศเพื่อให้คอมไพเลอร์สามารถจัดสรรพื้นที่สำหรับแต่ละตัวแปร ทุกตัวแปรจะจัดสรร 32 บิตและสามารถถือตัวชี้ไปยังวัตถุหรือ smallinteger .

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

Copyright ©2024 I Love Translation. All reserved.

E-mail: