Difference between revisions of "Begin/fr"
m (Fixed syntax highlighting; deleted category already in page template) |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Begin}} | {{Begin}} | ||
− | 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]], [[ | + | 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]]. |
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]]. | 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]]. | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang="pascal"> |
program Project1; | program Project1; | ||
var (..); | var (..); | ||
Line 15: | Line 15: | ||
Pour un bloc d'instructions, il délimite le début du bloc et est aussi terminé par une intruction ''end'': | Pour un bloc d'instructions, il délimite le début du bloc et est aussi terminé par une intruction ''end'': | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang="pascal"> |
if (..) then | if (..) then | ||
begin | begin | ||
Line 29: | Line 29: | ||
{{Keywords/fr}} | {{Keywords/fr}} | ||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 06:49, 26 January 2020
│
Deutsch (de) │
English (en) │
español (es) │
suomi (fi) │
français (fr) │
русский (ru) │
中文(中国大陆) (zh_CN) │
Le mot-clé begin est employé pour indiquer le début d'un section exécutable d'une fonction, d'une méthode d'un objet, d'une procédure, d'un programme, propriété d'un objet, ou est utilisé pour délimiter le début d'un bloc d'instruction.
Pour une fonction, une méthode, un programme ou une propriété, il est utilisé après toutes les déclarations const, type and var, et avant la première instruction exécutable. Le bloc ainsi commencé est toutjours temriné par une instruction end.
program Project1;
var (..);
begin
(..);
end.
Pour un bloc d'instructions, il délimite le début du bloc et est aussi terminé par une intruction end:
if (..) then
begin
(..)
end
else
begin
(..)
end;
Un begin doit être fermé par un end.
Mots-clés: begin — do — else — end — for — if — repeat — then — until — while