Sign in Join
Wiki copytemporary

End/fr: what changed

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

OldNewLine
1-Le [[Keyword/fr|mot-clé]] **end** termine un [bloc](</index.php?title=Block/fr&action=edit&redlink=1> "Block/fr \(page does not exist\)") d'instructions commencé par le mot-clé [[Begin/fr|begin]] ou [[Case/fr|case]], termine la déclaration des [champs](</index.php?title=field/fr&action=edit&redlink=1> "field/fr \(page does not exist\)") d'un [[Record/fr|enregistrement]], ou ferme une construction [try](</index.php?title=Try/fr&action=edit&redlink=1> "Try/fr \(page does not exist\)") .. [finally](</index.php?title=Finally/fr&action=edit&redlink=1> "Finally/fr \(page does not exist\)") or [try](</index.php?title=Try/fr&action=edit&redlink=1> "Try/fr \(page does not exist\)") .. [except](</index.php?title=Except/fr&action=edit&redlink=1> "Except/fr \(page does not exist\)"). Il est aussi utilisé pour fermer une [[Unit/fr|unité]] qui n'a pas de code d'initialisation.
1+Le [[Keyword/fr|mot-clé]] **end** termine un [[Block/fr|bloc]] d'instructions commencé par le mot-clé [[Begin/fr|begin]] ou [[Case/fr|case]], termine la déclaration des [[field/fr|champs]] d'un [[Record/fr|enregistrement]], ou ferme une construction [[Try/fr|try]] .. [[Finally/fr|finally]] or [[Try/fr|try]] .. [[Except/fr|except]]. Il est aussi utilisé pour fermer une [[Unit/fr|unité]] qui n'a pas de code d'initialisation.
22
3-Par exemple:
4-```
5-procedure Proc1;
6-
7- var a,b: integer;
8-
9- begin
10- (..)
11- end;
3+Par exemple:
4+
5+``` pascal
6+ procedure Proc1;
7+
8+ var a,b: integer;
9+
10+ begin
11+ (..)
12+ end;
1213```
1314
14-L'instruction _end_ est l'une des exceptions à la règle qui veut que chaque instruction doit être suivie par un point-virgule. En effet, l'instruction précédant exactement l'instruction _end_ ne requiert pas de point-virgule.
15+L'instruction *end* est l'une des exceptions à la règle qui veut que chaque instruction doit être suivie par un point-virgule. En effet, l'instruction précédant exactement l'instruction *end* ne requiert pas de point-virgule.
1516
16-Il termine aussi un fichier source Pascal, auquel cas il est suivi du point plutôt que du [[;|point-virgule]] (dans l'exemple ci-dessous, le dernier point-virgule est facultatif):
17-```
18-program Proc2;
19- var
20- SL: TStrings;
21- begin
22- SL := TStringlist.Create;
23- try
24- (..)
25- finally
26- SL.Free;
27- end;
28- end.
29-```
17+Il termine aussi un fichier source Pascal, auquel cas il est suivi du point plutôt que du [[;|point-virgule]] (dans l'exemple ci-dessous, le dernier point-virgule est facultatif):
3018
31-Pour une unité sans bloc d'initialisation, END est utilisé pour indiquer la fin de l'unité:
32-```
33-unit detent;
34- uses math;
35-
36- procedure delta(r:real);
37-
38- implementation
39-
40- procedure delta;
41- begin
42-
43- ...
44-
45- end;
46-
47- ...
48-
49- (* Note: Pas d'instruction '''begin''' *)
50-
51- end.
19+``` pascal
20+
21+ program Proc2;
22+ var
23+ SL: TStrings;
24+ begin
25+ SL := TStringlist.Create;
26+ try
27+ (..)
28+ finally
29+ SL.Free;
30+ end;
31+ end.
5232```
5333
54-Il ferme aussi un [[Record/fr|enregistrement]]:
55-```
56-Type
57- ExampleRecord = Record
58- Values: array [1..200] of real;
59- NumValues: Integer; { tient le nombre actuel de point dans le tableau }
60- Average: Real { tient la moyenne des valeurs dans le tableau }
61- End;
34+Pour une unité sans bloc d'initialisation, END est utilisé pour indiquer la fin de l'unité:
35+
36+``` pascal
37+ unit detent;
38+ uses math;
39+
40+ procedure delta(r:real);
41+
42+ implementation
43+
44+ procedure delta;
45+ begin
46+
47+ ...
48+
49+ end;
50+
51+ ...
52+
53+ (* Note: Pas d'instruction '''begin''' *)
54+
55+ end.
6256```
6357
64-
65-**Mots-clés:** [[Begin/fr|begin]] — [[Do/fr|do]] — [[Else/fr|else]] — end — [[For/fr|for]] — [[If/fr|if]] — [[Repeat/fr|repeat]] — [[Then/fr|then]] — [[Until/fr|until]] — [[While/fr|while]]
58+Il ferme aussi un [[Record/fr|enregistrement]]:
6659
60+``` pascal
61+ Type
62+ ExampleRecord = Record
63+ Values: array [1..200] of real;
64+ NumValues: Integer; { tient le nombre actuel de point dans le tableau }
65+ Average: Real { tient la moyenne des valeurs dans le tableau }
66+ End;
67+```
68+
6769---
68-*From the Free Pascal wiki, page "End/fr", as the Internet Archive kept it on 2025-01-14. 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).*
70+*From the Free Pascal wiki, page "End/fr", as it stood on 2020-02-14 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).*
71+Category: Control Structures/fr
72+Category: Pascal/fr

Back to history