home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
pascal
/
pascsrc.arc
/
PROCED2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
865b
|
30 lines
(* Chapter 5 - Program 2 *)
program Another_Procedure_Example;
var Count : integer;
Index : integer;
procedure Print_Data_Out(Puppy : integer);
begin
Writeln('This is the print routine',Puppy:5);
Puppy := 12;
end;
procedure Print_And_Modify(var Cat : integer);
begin
Writeln('This is the print and modify routine',Cat:5);
Cat := 35;
end;
begin (* main program *)
for Count := 1 to 3 do begin
Index := Count;
Print_Data_Out(Index);
Writeln('Back from the print routine, Index =',Index:5);
Print_And_Modify(Index);
Writeln('Back from the modify routine, Index =',Index:5);
Print_Data_Out(Index);
Writeln('Back from print again and the Index =',Index:5);
Writeln; (* This is just for formatting *)
end;
end. (* of main program *)