Sign in Join
Wiki copytemporary

Begin: what changed

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

OldNewLine
1-The [[Reserved word|reserved word]] `begin` marks the start of the definition of the executable portion of a [[Block|block]]. In conjunction with [[End|end]] it is also used to group [[statement|statements]] into a so-called “compound statement”.
1+The [[Reserved word|reserved word]] `begin` marks the start of the definition of the executable portion of a [[Block|block]]. In conjunction with [[End|`end`]] it is also used to group [[statement|statements]] into a so-called “compound statement”.
22
3-> **Note:** In [[Pascal]] a compound statement does not create a new scope. Only blocks do.
3+[![Note-icon.png](/wiki-images/b/be/Note-icon.png)](</File:Note-icon.png>)
44
5-In [[Extended Pascal|extended Pascal]] `to begin do …` starts the definition of the [[Initialization|initialization part of a module]].
5+**Note:** In [[Pascal]] a compound statement does not create a new scope. Only blocks do.
66
7-While every `begin` must have a corresponding `end`, not all occurrences of `end` have a corresponding `begin`.
7+In [[Extended Pascal|extended Pascal]] `to begin do …` starts the definition of the [[Initialization|`initialization` part of a module]].
88
9+While every `begin` must have a corresponding `end`, not all occurrences of `end` have a corresponding `begin`.
10+
911## syntax justification
1012
11-Lots of programming languages use a pair of single characters to indicate boundaries. Typing out the words `begin` and `end` is indeed more cumbersome than writing `{ }`. However, the meaning of such characters is not as obvious as words are.
13+Lots of programming languages use a pair of single characters to indicate boundaries. Typing out the words `begin` and `end` is indeed more cumbersome than writing `{ }`. However, the meaning of such characters is not as obvious as words are.
1214
1315## matching
1416
15-- The source editor of the [[Lazarus IDE]] supports a “find matching begin/end” function.
16-- [[vim]] can be configured to support matching Pascal’s `begin`/`end`, too.
17+ * The source editor of the [[Lazarus IDE]] supports a “find matching begin/end” function.
18+ * [[vim]] can be configured to support matching Pascal’s `begin`/`end`, too.
1719
20+
21+**Keywords:** begin — [[Do|do]] — [[Else|else]] — [[End|end]] — [[For|for]] — [[If|if]] — [[Repeat|repeat]] — [[Then|then]] — [[Until|until]] — [[While|while]]
22+
1823---
19-*From the Free Pascal wiki, page "Begin", as it stood on 2021-08-21 after a change by Kai Burghardt, 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).*
24+*From the Free Pascal wiki, page "Begin", as the Internet Archive kept it on 2022-11-28. 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