Do: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | - | ||
| 1 | + | The `do` keyword is a [[Reserved word|reserved word]] that is only used in conjunction with other [[Keyword|keywords]]. | |
| 2 | 2 | ||
| 3 | 3 | ## occurences | |
| 4 | 4 | ||
| 5 | - | ||
| 5 | + | The keyword `do` usually separates a language construct from an associated (compound) [[statement]]. | |
| 6 | 6 | ||
| 7 | - | ||
| 8 | - | ||
| 9 | - | ||
| 10 | - | ||
| 11 | - | ||
| 12 | - | ||
| 7 | + | * loops | |
| 8 | + | * [[For|`for`]] … `to` … `do` | |
| 9 | + | * [[While|`while`]] … `do` | |
| 10 | + | * [[Identifier|identifier]] scope lookup routing: [[With|`with`]] … `do` | |
| 11 | + | * [[Exceptions|exception]] handling: [[Try|`try`]] … [[Except|`except`]] `on` … `do` | |
| 12 | + | * in [[Extended Pascal|extended Pascal]] the start of initialization and finalization parts of a module: `to begin do …;` and `to end do …;` | |
| 13 | 13 | ||
| 14 | + | ||
| 15 | + | **Keywords:** [[Begin|begin]] — do — [[Else|else]] — [[End|end]] — [[For|for]] — [[If|if]] — [[Repeat|repeat]] — [[Then|then]] — [[Until|until]] — [[While|while]] | |
| 16 | + | ||
| 14 | 17 | --- | |
| 15 | - | ||
| 18 | + | *From the Free Pascal wiki, page "Do", as the Internet Archive kept it on 2023-02-23, last changed on 2020-10-15. 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).* |
