Free Pascal - Block statement: begin end

A compound statement is also known as block. to connect more than one statement in a statement, eventually reduces to a single command whole block of statements.

begin end

Description

begin end;
begin statement end;
begin statement statement end;
Used keywords: end begin

Input

  • statement - code

Examples

Free Pascal

Block statement the possible of use:
y:=10;
if x>1 then
begin
  x:=1;
  y:=y-1;
end;
while y>1 do
begin
  inc(x);
  dec(y);
end;

Free Pascal

Other pieces of example codes:
while i<20 do
begin
 i:= i+2;
 if i=16 then
 begin
    continue
 end;
 inc(x); 
end;
if i=10 then
     break
   else 
   begin
     dec(i)
   end
if i > 10 then
begin
i :=10;            i := i - 1;   inc(i);
end;
Languages: en hu cz sk