Free Pascal <-> Visual C++ .NET | Zložený príkaz

Free Pascal

begin end

Popis

begin end;
begin statement end;
begin statement statement end;
Použitá kľúčové slová: end begin

Vstup

  • statement - code

Príklady

Free Pascal

Možné požitie zložený príkaz:
y:=10;
if x>1 then
begin
  x:=1;
  y:=y-1;
end;
while y>1 do
begin
  inc(x);
  dec(y);
end;
.
Visual C++ .NET

{ }

Popis

{}
{statement}
{statement statement}

Vstup

Príklady

Visual C++ .NET

Možné požitie zložený príkaz:
y=10;
if (x>1)
{
  x=1;
  y=y-1;
}
while (y>1)
{
  x++;
  y--;
}
V iných jazykoch: en hu cz sk