1, while statement
C :
While (expression) {...}.
Delphi:
While
2, DO ... while () statement
C :
Do {...} while ();
Delphi:
REPEAT [
3, for statement
C :
For (;;;) {...}
example:
INT i = 1; for (i; i <5; i ) // or for (i = 2; i <5; i ) {...}
Delphi:
FOR
example:
Var i: integer; i: = 1; for i: = 2 to 5 do // cannot be written as for i to 5 do, because Delphi specifies the for statement counter (i) must be assigned here! Begin ... End; for i: = 2 DOWNTO 0 DO / / counter is decremented. Begin ... End; 4, the same point:
The same point in the above three cycles is that Break can be used in the cycle, and the consisher.break means that the forcibly terminated loop jump out of the cyclic body, Continue means that the cycle in the cycle is ended, and the new one is implemented. Wheel cycle.