Sign in Join
Wiki copytemporary

Becomes/zh CN: what changed

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

OldNewLine
1-<div style="float:left; margin: 0 10px 20px 0; padding:40px; font-size:500%; font-family: Georgia; background-color: #f9f9f9; border: 2px solid #777777;">
1+:=
22
33
4-=
54
6-</div>
7-
8-符号 ***:=*** (符号 [[Colon|冒号]] 跟着符号 [[Equal|等号]], 中间没空格或其他字符) 读作 ***成为(变成)***,在 [[Pascal]] 中意思是 *被赋值为...*:
9-
10-``` pascal
11- A := 4 ;
12- Circle_Area := Pi * Diameter ;
13- Name := 'Smith' ;
14- C := 1000 - C div 2 ;
5+符号 _** := **_ (符号 [[Colon|冒号]] 跟着符号 [[Equal|等号]], 中间没空格或其他字符) 读作 _**成为(变成)**_ ,在 [[Pascal]] 中意思是 _被赋值为..._ :
156```
16-
17-使用两个符号,冒号加等号(而不是只用一种,比如说光用=等号)是为了区分赋值与相等比较。
18-
19-例如,在Pascal以外的语言您可以写
20-
21-
22-A = B = D ;
7+A := 4 ;
8+ Circle_Area := Pi * Diameter ;
9+ Name := 'Smith' ;
10+ C := 1000 - C div 2 ;
11+```
2312
24-或
13+使用两个符号,冒号加等号(而不是只用一种,比如说光用=等号)是为了区分赋值与相等比较。
2514
26-A = B = D
15+例如,在Pascal以外的语言您可以写
2716
28-取决与分号在那种语言中是否必要。
17+ A = B = D ;
18+ 或
19+ A = B = D
2920
30-该表达式的含义取决于语言。例如,在Fortran和Basic中,该表达式意思是将A赋值为“B和D相等吗?” 在C语言中,该表达式意思是将变量A和B的值赋值给D。这种类型的指令错误在C语言中再常见不过了以至于这种表达式经常被编译器标识一个警告,除非您通过在表达式两旁加括号告诉编译器您是有意这么做(多重赋值)。在C语言中测试相等的正确做法是使用***A = B == D;***
21+取决与分号在那种语言中是否必要。
3122
32-在Pascal中这种混淆不会发生的,因为该语句非法。您可以写
23+该表达式的含义取决于语言。例如,在Fortran和Basic中,该表达式意思是将A赋值为“B和D相等吗?” 在C语言中,该表达式意思是将变量A和B的值赋值给D。这种类型的指令错误在C语言中再常见不过了以至于这种表达式经常被编译器标识一个警告,除非您通过在表达式两旁加括号告诉编译器您是有意这么做(多重赋值)。在C语言中测试相等的正确做法是使用 _**A = B == D;**_
3324
34-``` pascal
25+在Pascal中这种混淆不会发生的,因为该语句非法。您可以写
26+```
3527A := B = D;
3628```
3729
38-意思与FORTRAN或BASIC相同,就是将A赋值为“B和D相等吗?”
39-
40-要将A,B,D赋予相同的值需要显式的分开赋值形式
41-
42-
43-A := D ; B := D ;
30+意思与FORTRAN或BASIC相同,就是将A赋值为“B和D相等吗?”
4431
45-或
32+要将A,B,D赋予相同的值需要显式的分开赋值形式
4633
47-B := D ; A := B ;
34+ A := D ; B := D ;
35+ 或
36+ B := D ; A := B ;
37+ 或
38+ A := D ; B := A ;
4839
49-或
40+取决于在执行中是否有差异或有副作用 (D 可以式一个动态变量,比方说一个系统 [port](</index.php?title=Port&action=edit&redlink=1> "Port \(page does not exist\)"), 一个 [[Function|函数]] 或是一个[[Object|对象]] 的 [[Property|属性]] ,因此 [[Identifier|标识符]] D 在第一和第二个赋值示例中可能会有所不同)
5041
51-A := D ; B := A ;
42+
5243
53-取决于在执行中是否有差异或有副作用 (D 可以式一个动态变量,比方说一个系统 [[Port|port]], 一个 [[Function|函数]] 或是一个[[Object|对象]] 的 [[Property|属性]] ,因此 [[Identifier|标识符]] D 在第一和第二个赋值示例中可能会有所不同)
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+****
5455
5556---
56-*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).*
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).*

Back to history