Visual Basic .NET <-> Free Pascal | Podmíněný příkaz

Visual Basic .NET

if then end if, if then else end if

Popis

if condition then
statements1
end if
if condition then
statements1
else
statements2
end if
Použitá klíčová slova: if else then end

Vstup

Příklady

Visual Basic .NET

Možné použití Podmíněný příkaz:
if i > 10 then
i =10
            i = i - 1
   i=i+1
end if
if i < 10 then
 i = 10
 else
 i=1
end if
.
Free Pascal

if then, if then else

Popis

if condition then statement1;
if condition then statement1 else statement2;
Použitá klíčová slova: if else then

Vstup

Příklady

Free Pascal

Možné použití Podmíněný příkaz:
if i > 10 then
begin
i :=10;            i := i - 1;   inc(i);
end;
if i < 10 then i := 10 else i:=1;
V jiných jazycích: en hu cz sk