Language Reference - OperatorsAutoIt has the following assignment, mat การแปล - Language Reference - OperatorsAutoIt has the following assignment, mat ไทย วิธีการพูด

Language Reference - OperatorsAutoI

Language Reference - Operators
AutoIt has the following assignment, mathematical, comparison, and logical operators.



Operator Description

Assignment operators
=
Assignment. e.g. $vVar = 5 (assigns the number 5 to $vVar)
+=
Addition assignment. e.g. $vVar += 1 (adds 1 to $vVar)
-=
Subtraction assignment.
*=
Multiplication assignment.
/=
Division assignment.

Concatenation operators
& Concatenates/joins two strings. e.g. "one" & 10 (equals "one10")
&=
Concatenation assignment. e.g. $vVar = "one", and then $vVar &= 10 ($vVar now equals "one10")

Mathematical operators
+ Adds two numbers. e.g. 10 + 20 (equals 30)
- Subtracts two numbers. e.g. 20 - 10 (equals 10)
Also acts as a unary minus (sets the negative value of a variable)
* Multiplies two numbers. e.g. 20 * 10 (equals 200)
/ Divides two numbers. e.g. 20 / 10 (equals 2)
^ Raises a number to the power. e.g. 2 ^ 4 (equals 16)

Comparison operators (case insensitive if used with strings except for ==)
= Tests if two values are equal. e.g. If $var = 5 Then (true if $vVar equals 5). Case insensitive when used with strings. See Note below about comparing mixed datatypes.
== Tests if two strings are equal. Case sensitive. The left and right values are converted to strings if they are not strings already. This operator should only be used if string comparisons need to be case sensitive.
Tests if two values are not equal. Case insensitive when used with strings. To do a case sensitive not equal comparison use Not ("string1" == "string2")
> Tests if the first value is greater than the second. Strings are compared lexicographically even if the contents of the string happen to be numeric.
>= Tests if the first value is greater than or equal to the second. Strings are compared lexicographically even if the contents of the string happen to be numeric.
< Tests if the first value is less than the second. Strings are compared lexicographically even if the contents of the string happen to be numeric.
6 Then (True if $vVar equals 5 and $vVar2 is greater than 6)
Or Logical Or operation. e.g. If $vVar = 5 Or $vVar2 > 6 Then (True if $vVar equals 5 or $vVar2 is greater than 6)
Not Logical Not operation. e.g. Not 1 (False)

Conditional operator
? : Select conditionally an expression. e.g. $condition ? $expression1 : $expression2 ($expression1 if $condition is True or $expression2 if False) See the Ternary operator for an example.



When more than one operator is used in an expression the order in which things happen is controlled by operator precedence. The precedence used in AutoIt is given below. Where two operators have the same precedence the expression is evaluated left to right.

From highest precedence to lowest:

Not
^
* /
+ -
&
< > = = ==
And Or





e.g. 2 + 4 * 10 is evaluated as 42:

4 * 10 (equals 40)

2 + 40 (equals 42)

As the * has a higher precedence than + it occurs before the addition.



You can use brackets to force a part of the expression to be evaluated first.

e.g. (2 + 4) * 10 equals 60.



Note the following when using the logical operators And, Or:

e.g. If MyFunc1() Or MyFunc2() Then (MyFunc2() is not called if MyFunc1() returns true)

e.g. If MyFunc1() And MyFunc2() Then (MyFunc2() is not called if MyFunc1() returns false)



Note: Care is needed if comparing mixed datatypes, as unless the == case-sensitive string operator is used, mixed comparisons are usually made numerically. Most strings will be evaluated as 0 and so the result may well not be the one expected. It is recommended to force the items being compared into the same datatype using Number/String before the comparison.

0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
Language Reference - OperatorsAutoIt has the following assignment, mathematical, comparison, and logical operators. Operator Description Assignment operators = Assignment. e.g. $vVar = 5 (assigns the number 5 to $vVar) += Addition assignment. e.g. $vVar += 1 (adds 1 to $vVar) -= Subtraction assignment. *= Multiplication assignment. /= Division assignment. Concatenation operators & Concatenates/joins two strings. e.g. "one" & 10 (equals "one10") &= Concatenation assignment. e.g. $vVar = "one", and then $vVar &= 10 ($vVar now equals "one10") Mathematical operators + Adds two numbers. e.g. 10 + 20 (equals 30) - Subtracts two numbers. e.g. 20 - 10 (equals 10)Also acts as a unary minus (sets the negative value of a variable) * Multiplies two numbers. e.g. 20 * 10 (equals 200) / Divides two numbers. e.g. 20 / 10 (equals 2) ^ Raises a number to the power. e.g. 2 ^ 4 (equals 16) Comparison operators (case insensitive if used with strings except for ==) = Tests if two values are equal. e.g. If $var = 5 Then (true if $vVar equals 5). Case insensitive when used with strings. See Note below about comparing mixed datatypes. == Tests if two strings are equal. Case sensitive. The left and right values are converted to strings if they are not strings already. This operator should only be used if string comparisons need to be case sensitive. <> Tests if two values are not equal. Case insensitive when used with strings. To do a case sensitive not equal comparison use Not ("string1" == "string2") > Tests if the first value is greater than the second. Strings are compared lexicographically even if the contents of the string happen to be numeric. >= Tests if the first value is greater than or equal to the second. Strings are compared lexicographically even if the contents of the string happen to be numeric. < Tests if the first value is less than the second. Strings are compared lexicographically even if the contents of the string happen to be numeric. <= Tests if the first value is less than or equal to the second. Strings are compared lexicographically even if the contents of the string happen to be numeric. Logical operators And Logical And operation. e.g. If $vVar = 5 And $vVar2 > 6 Then (True if $vVar equals 5 and $vVar2 is greater than 6) Or Logical Or operation. e.g. If $vVar = 5 Or $vVar2 > 6 Then (True if $vVar equals 5 or $vVar2 is greater than 6) Not Logical Not operation. e.g. Not 1 (False) Conditional operator ? : Select conditionally an expression. e.g. $condition ? $expression1 : $expression2 ($expression1 if $condition is True or $expression2 if False) See the Ternary operator for an example. When more than one operator is used in an expression the order in which things happen is controlled by operator precedence. The precedence used in AutoIt is given below. Where two operators have the same precedence the expression is evaluated left to right.From highest precedence to lowest: Not ^ * / + - & < > <= >= = <> == And Or e.g. 2 + 4 * 10 is evaluated as 42: 4 * 10 (equals 40) 2 + 40 (equals 42)As the * has a higher precedence than + it occurs before the addition. You can use brackets to force a part of the expression to be evaluated first.e.g. (2 + 4) * 10 equals 60.Note the following when using the logical operators And, Or:e.g. If MyFunc1() Or MyFunc2() Then (MyFunc2() is not called if MyFunc1() returns true)e.g. If MyFunc1() And MyFunc2() Then (MyFunc2() is not called if MyFunc1() returns false) Note: Care is needed if comparing mixed datatypes, as unless the == case-sensitive string operator is used, mixed comparisons are usually made numerically. Most strings will be evaluated as 0 and so the result may well not be the one expected. It is recommended to force the items being compared into the same datatype using Number/String before the comparison.
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
อ้างอิงภาษา - ผู้ประกอบการ
AutoIt มีการกำหนดต่อไปนี้ทางคณิตศาสตร์การเปรียบเทียบและการดำเนินการทางตรรกะ. ผู้ประกอบการรายละเอียดการกำหนดผู้ประกอบการ= การกำหนด เช่น $ vVar = 5 (ระบุเลขที่ 5 ถึง $ vVar) + = มอบหมายเพิ่ม เช่น $ vVar + = 1 (เพิ่ม 1 ถึง $ vVar) - = . มอบหมายลบ* = . มอบหมายคูณ/ = . กองการกำหนดผู้ประกอบการ Concatenation และเชื่อม / ร่วมสองสาย เช่น "หนึ่ง" และ 10 (เท่ากับ "one10") และ = มอบหมาย Concatenation เช่น $ vVar = "หนึ่ง" แล้ว $ vVar & = 10 ($ vVar ตอนนี้เท่ากับ "one10") ดำเนินการทางคณิตศาสตร์+ เพิ่มตัวเลขสอง เช่น 10 + 20 (เท่ากับ 30) - ลบตัวเลขสอง เช่น 20-10 (เท่ากับ 10) นอกจากนี้ยังทำหน้าที่เป็นลบเอก (กำหนดค่าลบของตัวแปร) * คูณสองหมายเลข เช่น 20 * 10 (เท่ากับ 200) / หารตัวเลขสอง เช่น 20/10 (เท่ากับ 2) ^ ยกตัวเลขเพื่ออำนาจ เช่น 2 ^ 4 (เท่ากับ 16) ดำเนินการเปรียบเทียบ (กรณีตายถ้าใช้กับสตริงยกเว้น ==) = ทดสอบว่าสองค่าเท่ากัน เช่นถ้า $ var = 5 แล้ว (จริงถ้า $ vVar เท่ากับ 5) กรณีตายเมื่อใช้กับสตริง ดูหมายเหตุด้านล่างเกี่ยวกับการเปรียบเทียบประเภทข้อมูลผสม. == ทดสอบว่าสองสายมีค่าเท่ากัน กรณีที่สำคัญ. ค่าทางซ้ายและขวาจะถูกแปลงเป็นสตริงถ้าพวกเขาไม่ได้อยู่แล้วสตริง ผู้ประกอบการนี้ควรจะใช้เฉพาะในกรณีที่การเปรียบเทียบสตริงจะต้องมีกรณีที่สำคัญ. <> ทดสอบว่าสองค่าไม่เท่ากัน กรณีตายเมื่อใช้กับสตริง การทำเช่นกรณีที่มีความสำคัญไม่ได้ใช้การเปรียบเทียบที่เท่าเทียมกันไม่ได้ ( "string1" == "string2") > ทดสอบว่าค่าแรกมีค่ามากกว่าที่สอง สตริงจะเปรียบเทียบ lexicographically แม้ว่าเนื้อหาของสตริงจะเกิดขึ้นจะเป็นตัวเลข. > = ทดสอบว่าค่าแรกมากกว่าหรือเท่ากับสอง สตริงจะเปรียบเทียบ lexicographically แม้ว่าเนื้อหาของสตริงจะเกิดขึ้นจะเป็นตัวเลข. <ทดสอบว่าค่าแรกจะน้อยกว่าที่สอง สตริงจะเปรียบเทียบ lexicographically แม้ว่าเนื้อหาของสตริงจะเกิดขึ้นจะเป็นตัวเลข. <= ทดสอบว่าค่าแรกน้อยกว่าหรือเท่ากับสอง สตริงจะเปรียบเทียบ lexicographically แม้ว่าเนื้อหาของสตริงจะเกิดขึ้นจะเป็นตัวเลข. ผู้ประกอบการลอจิกและการดำเนินงานเชิงตรรกะและ เช่นถ้า $ vVar = 5 และ $ vVar2> 6 แล้ว (จริงถ้า $ vVar เท่ากับ 5 และ $ vVar2 มีค่ามากกว่า 6) หรือตรรกะหรือการดำเนินงาน เช่นถ้า $ vVar = 5 หรือ $ vVar2> 6 แล้ว (จริงถ้า $ vVar เท่ากับ 5 หรือ $ vVar2 มีค่ามากกว่า 6) ไม่ตรรกะไม่ได้ดำเนินการ เช่นไม่ได้ 1 (เท็จ) ดำเนินการตามเงื่อนไข? : เลือกเงื่อนไขการแสดงออก สภาพเช่น $? $ Expression1:. $ Expression2 ($ Expression1 ถ้า $ สภาพเป็นจริงหรือ $ Expression2 ถ้าเท็จ) ดูผู้ประกอบการ Ternary เช่นเมื่อมากกว่าหนึ่งผู้ประกอบการที่ใช้ในการแสดงออกลำดับที่สิ่งที่เกิดขึ้นจะถูกควบคุมโดยผู้ประกอบการมีความสำคัญ ความสำคัญที่ใช้ในการ AutoIt ได้รับด้านล่าง ที่สองผู้ประกอบการมีความสำคัญเช่นเดียวกันการแสดงออกได้รับการประเมินจากซ้ายไปขวา. จากลำดับสูงสุดไปต่ำสุด: ไม่^ * / + - & <> <=> = = <> == หรือเช่น 2 + 4 * 10 ได้รับการประเมินเป็น 42: 4 * 10 (เท่ากับ 40) 2 + 40 (เท่ากับ 42) . ในฐานะที่เป็น * มีความสำคัญสูงกว่า + มันเกิดขึ้นก่อนนอกจากนี้คุณสามารถใช้วงเล็บเพื่อบังคับให้เป็นส่วนหนึ่งของการแสดงออกที่ ที่จะได้รับการประเมินครั้งแรก. เช่น (2 + 4) * 10 เท่ากับ 60 ทราบต่อไปนี้เมื่อใช้ดำเนินการทางตรรกะ AND, OR: เช่นถ้า MyFunc1 () หรือ MyFunc2 () แล้ว (MyFunc2 () ไม่ได้เรียกว่าถ้า MyFunc1 ผลตอบแทน () จริง) เช่นหาก MyFunc1 () และ MyFunc2 () แล้ว (MyFunc2 () ไม่ได้เรียกว่าถ้า MyFunc1 () ผลตอบแทนเท็จ) หมายเหตุ: การดูแลเป็นสิ่งจำเป็นหากเปรียบเทียบประเภทข้อมูลผสมเป็นเว้นแต่ == กรณีที่มีความอ่อนไหวประกอบสตริงถูกนำมาใช้ผสม รถมักจะทำตัวเลข สายส่วนใหญ่จะได้รับการประเมินเป็น 0 และเพื่อผลที่ดีอาจไม่ได้รับการอย่างใดอย่างหนึ่งที่คาดว่าจะ ก็จะแนะนำให้บังคับรายการที่ถูกเมื่อเทียบเข้าประเภทข้อมูลเดียวกันโดยใช้หมายเลขโทรศัพท์ / String ก่อนที่จะเปรียบเทียบ



























































































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

Copyright ©2025 I Love Translation. All reserved.

E-mail: