PHP <-> Object Pascal | Příkaz inkrementace
PHP
++
Popis
++ var ;
Vstup
- var - přijímač hodnoty
Příklady
PHP
Možné použití příkaz inkrementace:$i=0;
while ($i<10) ++$i;
$x =0;
while ($i<20)
{
$i= $i+2;
if ($i==16)
{
continue;
}
$x++;
}
.
Object Pascal
inc
Popis
inc (přijímač hodnoty) ;
Vstup
- var - přijímač hodnoty
Příklady
Object Pascal
Možné použití příkaz inkrementace:i:=0;
while i<10 do inc(i);
x :=0;
while i<20 do
begin
i:= i+2;
if i=16 then
begin
continue
end;
inc(x);
end;
PHP
++
Popis
var ++ ;
Vstup
- var - přijímač hodnoty
Příklady
PHP
Možné použití příkaz inkrementace:$i=0;
while ($i<10) ++$i;
$x =0;
while ($i<20)
{
$i= $i+2;
if ($i==16)
{
continue;
}
$x++;
}
.
Object Pascal
inc
Popis
inc (přijímač hodnoty) ;
Vstup
- var - přijímač hodnoty
Příklady
Object Pascal
Možné použití příkaz inkrementace:i:=0;
while i<10 do inc(i);
x :=0;
while i<20 do
begin
i:= i+2;
if i=16 then
begin
continue
end;
inc(x);
end;
Příkaz inkrementace v jiném programovacím jazyce:
Rozdíly oproti: