Difference between revisions of "Begin/fr"

From Free Pascal wiki
Jump to navigationJump to search
(Created page with "{{Begin}} The keyword '''begin''' is used to indicate the start of the executable section of a function, method of an object, [...")
 
Line 1: Line 1:
 
{{Begin}}
 
{{Begin}}
  
The [[Keyword|keyword]] '''begin''' is used to indicate the start of the executable section of a [[Function|function]], [[Method|method]] of an [[Object|object]], [[Procedure|procedure]], [[Program|program]], [[property]] of an object, or is used to delineate the start of a [[block]] statement.  
+
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 méthode [[Method/fr|méthode]] d'un [[Object/fr|objet]], d'une [[Procedure/fr|procédure]], d'un [[Program/fr|program]], [[property/fr|propriété]] d'un objet, ou est utilisé pour délimiter le début d'un [[block/fr|bloc d'instruction]].
  
For a function, method, procedure, program, or property, it is used after all [[Const|const]], [[Type|type]] and [[Var|var]] declarations, and before the first executable statement. It is always terminated by an [[End|end]] statement:
+
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>
Line 13: Line 13:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
For a block statement, it delineates the top of the block, and is also terminated by an end statement:
+
Pour un bloc d'instructions, il délimite le début du bloc et est aussi terminé par une intruction ''end'':  
  
 
<syntaxhighlight>
 
<syntaxhighlight>
Line 26: Line 26:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
A '''begin''' ''must'' be closed with '''[[End|end]]'''.
+
Un '''begin''' ''doit'' être fermé par un '''[[End/fr|end]]'''.
  
 
{{Keywords}}
 
{{Keywords}}

Revision as of 07:04, 8 July 2014

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 méthode d'un objet, d'une procédure, d'un program, 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.


Keywords: begindoelseendforifrepeatthenuntilwhile