Begin/zh CN: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Begin/zh CN
| Old | New | Line | |
|---|---|---|---|
| 1 | + | 关键字 [[Keyword|keyword]] **begin** 用于标明[[Function|函数]]、[[Object|对象]]的[[Method|属性]]、[[Procedure|过程]]、[[Program|程序]]、[[Property|属性]]等的开始, 也可以用于[[Block|程序块]]的开始。 | |
| 2 | + | ||
| 3 | + | 对于一个函数,方法(method)、过程(procedure)、程序(program)、属性(property),它总是用于[[Const|const]]、[[Type|type]]以及[[Var|var]]之后,在第一个可执行语句之前。它必须伴随[[End|end]]同时出现: | |
| 4 | + | ||
| 5 | + | ``` pascal | |
| 6 | + | program Project1; | |
| 7 | + | var (..); | |
| 8 | + | begin | |
| 9 | + | (..); | |
| 10 | + | end. | |
| 11 | + | ``` | |
| 12 | + | ||
| 13 | + | 对于块标记,此关键字用于开头,同样也必须标明结束: | |
| 14 | + | ||
| 15 | + | ``` pascal | |
| 16 | + | if (..) then | |
| 17 | + | begin | |
| 18 | + | (..) | |
| 19 | + | end | |
| 20 | + | else | |
| 21 | + | begin | |
| 22 | + | (..) | |
| 23 | + | end; | |
| 24 | + | ``` | |
| 25 | + | ||
| 26 | + | 一个**begin** *必须*对应一个**[[End|end]]**。 | |
| 27 | + | ||
| 28 | + | --- | |
| 29 | + | *From the Free Pascal wiki, page "Begin/zh CN", as it stood on 2020-01-26 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).* |
