home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
pascal
/
pascsrc.arc
/
LOOPIF.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
628b
|
18 lines
(* Chapter 4 - Program 3 *)
program Loops_And_Ifs;
var Count,Index : integer;
begin (* Main program *)
for Count := 1 to 10 do begin (* Main loop *)
if Count < 6 then
Writeln('The loop counter is up to ',Count:4);
if Count = 8 then begin
for Index := 8 to 12 do begin (* Internal loop *)
Write('The internal loop index is ',Index:4);
Write(' and the main count is ',Count:4);
Writeln;
end; (* Internal loop *)
end; (* if Count = 8 condition *)
end; (* Main loop *)
end. (* Main program *)