Difference between revisions of "Begin"

From Lazarus wiki
Jump to navigationJump to search
(Undo revision 60486 by Avmaksimov (talk))
Line 26: Line 26:
'''begin''' ''должно'' быть закрыто '''[[End|end]]'''.
A '''begin''' ''must'' be closed with '''[[End|end]]'''.

Revision as of 20:14, 12 August 2012

Deutsch (de) English (en) español (es) suomi (fi) français (fr) русский (ru) 中文(中国大陆)‎ (zh_CN)

The keyword begin is used to indicate the start of the executable section of a function, method of an object, procedure, program, property of an object, or is used to delineate the start of a block statement.

For a function, method, procedure, program, or property, it is used after all const, type and var declarations, and before the first executable statement. It is always terminated by an end statement:

  program Project1;
  var (..);

For a block statement, it delineates the top of the block, and is also terminated by an end statement:

  if (..) then

A begin must be closed with end.

Keywords: begindoelseendforifrepeatthenuntilwhile