Sign in Join
Wiki copytemporary

Becomes/zh CN: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-:=
1+=
22
3-
3+符号 ***:=*** (符号 [[Colon|冒号]] 跟着符号 [[Equal|等号]], 中间没空格或其他字符) 读作 ***成为(变成)***,在 [[Pascal]] 中意思是 *被赋值为...*:
44
5-符号 _** := **_ (符号 [[Colon|冒号]] 跟着符号 [[Equal|等号]], 中间没空格或其他字符) 读作 _**成为(变成)**_ ,在 [[Pascal]] 中意思是 _被赋值为..._ :
6-```
7-A := 4 ;
8- Circle_Area := Pi * Diameter ;
9- Name := 'Smith' ;
10- C := 1000 - C div 2 ;
5+``` pascal
6+ A := 4 ;
7+ Circle_Area := Pi * Diameter ;
8+ Name := 'Smith' ;
9+ C := 1000 - C div 2 ;
1110```
1211
13-使用两个符号,冒号加等号(而不是只用一种,比如说光用=等号)是为了区分赋值与相等比较。
12+使用两个符号,冒号加等号(而不是只用一种,比如说光用=等号)是为了区分赋值与相等比较。
1413
15-例如,在Pascal以外的语言您可以写
14+例如,在Pascal以外的语言您可以写
1615
17- A = B = D ;
18- 或
19- A = B = D
16+
17+A = B = D ;
2018
21-取决与分号在那种语言中是否必要。
19+或
2220
23-该表达式的含义取决于语言。例如,在Fortran和Basic中,该表达式意思是将A赋值为“B和D相等吗?” 在C语言中,该表达式意思是将变量A和B的值赋值给D。这种类型的指令错误在C语言中再常见不过了以至于这种表达式经常被编译器标识一个警告,除非您通过在表达式两旁加括号告诉编译器您是有意这么做(多重赋值)。在C语言中测试相等的正确做法是使用 _**A = B == D;**_
21+A = B = D
2422
25-在Pascal中这种混淆不会发生的,因为该语句非法。您可以写
26-```
23+取决与分号在那种语言中是否必要。
24+
25+该表达式的含义取决于语言。例如,在Fortran和Basic中,该表达式意思是将A赋值为“B和D相等吗?” 在C语言中,该表达式意思是将变量A和B的值赋值给D。这种类型的指令错误在C语言中再常见不过了以至于这种表达式经常被编译器标识一个警告,除非您通过在表达式两旁加括号告诉编译器您是有意这么做(多重赋值)。在C语言中测试相等的正确做法是使用***A = B == D;***
26+
27+在Pascal中这种混淆不会发生的,因为该语句非法。您可以写
28+
29+``` pascal
2730A := B = D;
2831```
2932
30-意思与FORTRAN或BASIC相同,就是将A赋值为“B和D相等吗?”
33+意思与FORTRAN或BASIC相同,就是将A赋值为“B和D相等吗?”
3134
32-要将A,B,D赋予相同的值需要显式的分开赋值形式
35+要将A,B,D赋予相同的值需要显式的分开赋值形式
3336
34- A := D ; B := D ;
35- 或
36- B := D ; A := B ;
37- 或
38- A := D ; B := A ;
37+
38+A := D ; B := D ;
3939
40-取决于在执行中是否有差异或有副作用 (D 可以式一个动态变量,比方说一个系统 [port](</index.php?title=Port&action=edit&redlink=1> "Port \(page does not exist\)"), 一个 [[Function|函数]] 或是一个[[Object|对象]] 的 [[Property|属性]] ,因此 [[Identifier|标识符]] D 在第一和第二个赋值示例中可能会有所不同)
40+或
4141
42-
42+B := D ; A := B ;
4343
44-navigation bar: topic: Pascal symbols single characters | [`+` (plus)](</index.php?title=Plus/zh_CN&action=edit&redlink=1> "Plus/zh CN \(page does not exist\)") • [`-` (minus)](</index.php?title=Minus/zh_CN&action=edit&redlink=1> "Minus/zh CN \(page does not exist\)") • [`*` (asterisk)](</index.php?title=*/zh_CN&action=edit&redlink=1> "*/zh CN \(page does not exist\)") • [`/` (slash)](</index.php?title=Slash/zh_CN&action=edit&redlink=1> "Slash/zh CN \(page does not exist\)")
45-[`=` (equal)](</index.php?title=Equal/zh_CN&action=edit&redlink=1> "Equal/zh CN \(page does not exist\)") • [`>` (greater than)](</index.php?title=Greater_than/zh_CN&action=edit&redlink=1> "Greater than/zh CN \(page does not exist\)") • [`<` (less than)](</index.php?title=Less_than/zh_CN&action=edit&redlink=1> "Less than/zh CN \(page does not exist\)")
46-[`.` (period)](</index.php?title=period/zh_CN&action=edit&redlink=1> "period/zh CN \(page does not exist\)") • [[Colon/zh CN|`:` (colon)]] • [`;` (semi colon)](</index.php?title=;/zh_CN&action=edit&redlink=1> ";/zh CN \(page does not exist\)")
47-[`^` (hat)](</index.php?title=%5E/zh_CN&action=edit&redlink=1> "^/zh CN \(page does not exist\)") • [`@` (at)](</index.php?title=@/zh_CN&action=edit&redlink=1> "@/zh CN \(page does not exist\)")
48-[`$` (dollar sign)](</index.php?title=Dollar_sign/zh_CN&action=edit&redlink=1> "Dollar sign/zh CN \(page does not exist\)") • [`&` (ampersand)](</index.php?title=%26/zh_CN&action=edit&redlink=1> "&/zh CN \(page does not exist\)") • [`#` (hash)](</index.php?title=Hash/zh_CN&action=edit&redlink=1> "Hash/zh CN \(page does not exist\)")
49-[`'` (single quote)](</index.php?title=%27/zh_CN&action=edit&redlink=1> "'/zh CN \(page does not exist\)")
50----|---
51-character pairs | [`<>` (not equal)](</index.php?title=Not_equal/zh_CN&action=edit&redlink=1> "Not equal/zh CN \(page does not exist\)") • [`<=` (less than or equal)](</index.php?title=Less_than_or_equal/zh_CN&action=edit&redlink=1> "Less than or equal/zh CN \(page does not exist\)") • `:=` (becomes) • [`>=` (greater than or equal)](</index.php?title=Greater_than_or_equal/zh_CN&action=edit&redlink=1> "Greater than or equal/zh CN \(page does not exist\)") • [[symmetric difference|`><` (symmetric difference)]] • [[Slash|`//` (double slash)]]
52-
53-
54-****
44+或
5545
46+A := D ; B := A ;
47+
48+取决于在执行中是否有差异或有副作用 (D 可以式一个动态变量,比方说一个系统 [[Port|port]], 一个 [[Function|函数]] 或是一个[[Object|对象]] 的 [[Property|属性]] ,因此 [[Identifier|标识符]] D 在第一和第二个赋值示例中可能会有所不同)
49+
5650---
57-*From the Free Pascal wiki, page "Becomes/zh CN", as the Internet Archive kept it on 2023-04-06. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
51+*From the Free Pascal wiki, page "Becomes/zh CN", as it stood on 2020-02-09 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history