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