Free Pascal <-> Visual Basic .NET | Elöltesztelő ciklus
Free Pascal Használt kulcsszavak: do while
while do
Leírás
while condition do statement;
Bemenet
- condition - Logikai érték Feltétel lehet akármilyen kifejezés
- statement - Utasítások
Példaprogramok
Free Pascal
Elöltesztelő ciklus lehetséges használata: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;
.
Visual Basic .NET Használt kulcsszavak: while end
while end while
Leírás
while condition
statements
end while
Bemenet
- condition - Logikai érték Feltétel lehet akármilyen kifejezés
- statements - Utasítások
Példaprogramok
Visual Basic .NET
Elöltesztelő ciklus lehetséges használata:i=0
while i<10
i=i+1
end while
x =0
while i<20
i= i+2
if i=16 then
continue while
end if
x=x+1
end while
Free Pascal Használt kulcsszavak: do while
while do
Leírás
while condition do statement;
Bemenet
- condition - Logikai érték Feltétel lehet akármilyen kifejezés
- statement - Utasítások
Példaprogramok
Free Pascal
Elöltesztelő ciklus lehetséges használata: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;
.
Visual Basic .NET Használt kulcsszavak: do while loop
do while loop
Leírás
do while condition
statements
loop
Bemenet
- condition - Logikai érték Feltétel lehet akármilyen kifejezés
- statements - Utasítások
Példaprogramok
Visual Basic .NET
Elöltesztelő ciklus lehetséges használata:i=0
while i<10
i=i+1
end while
x =0
while i<20
i= i+2
if i=16 then
continue while
end if
x=x+1
end while
Elöltesztelő ciklus más programozási nyelven:
Különbségek: