Begin/fr: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Begin/fr
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Le [[Keyword/fr|mot-clé]] **begin** est employé pour indiquer le début d'un section exécutable d'une [[Function/fr|fonction]], d'une [[Method/fr|méthode]] d'un [[Object/fr|objet]], d'une [[Procedure/fr|procédure]], d'un [[Program/fr|programme]], [[Property/fr|propriété]] d'un objet, ou est utilisé pour délimiter le début d'un [[Block/fr|bloc d'instruction]]. | |
| 2 | + | ||
| 3 | + | Pour une fonction, une méthode, un programme ou une propriété, il est utilisé après toutes les déclarations [[Const/fr|const]], [[Type/fr|type]] and [[Var/fr|var]], et avant la première instruction exécutable. Le bloc ainsi commencé est toutjours temriné par une instruction [[End/fr|end]]. | |
| 4 | + | ||
| 5 | + | ``` pascal | |
| 6 | + | program Project1; | |
| 7 | + | var (..); | |
| 8 | + | begin | |
| 9 | + | (..); | |
| 10 | + | end. | |
| 11 | + | ``` | |
| 12 | + | ||
| 13 | + | Pour un bloc d'instructions, il délimite le début du bloc et est aussi terminé par une intruction *end*: | |
| 14 | + | ||
| 15 | + | ``` pascal | |
| 16 | + | if (..) then | |
| 17 | + | begin | |
| 18 | + | (..) | |
| 19 | + | end | |
| 20 | + | else | |
| 21 | + | begin | |
| 22 | + | (..) | |
| 23 | + | end; | |
| 24 | + | ``` | |
| 25 | + | ||
| 26 | + | Un **begin** *doit* être fermé par un **[[End/fr|end]]**. | |
| 27 | + | ||
| 28 | + | --- | |
| 29 | + | *From the Free Pascal wiki, page "Begin/fr", 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).* |
