home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PASSRC.ZIP / PROCED1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  958b  |  45 lines

  1.                                 (* Chapter 5 - Program 1 *)
  2. program First_Procedure_Call;
  3.  
  4. var  Count  : integer;
  5.  
  6. procedure Write_A_Header;
  7. begin
  8.    Writeln('This is the header');
  9. end;
  10.  
  11. procedure Write_A_Message;
  12. begin
  13.    Writeln('This is the message and the count is',Count:4);
  14. end;
  15.  
  16. procedure Write_An_Ending;
  17. begin
  18.    Writeln('This is the ending message');
  19. end;
  20.  
  21. begin  (* main program *)
  22.    Write_A_Header;
  23.    for Count := 1 to 8 do
  24.       Write_A_Message;
  25.    Write_An_Ending;
  26. end.  (* of main program *)
  27.  
  28.  
  29.  
  30.  
  31. { Result of execution
  32.  
  33. This is the header
  34. This is the message and the count is   1
  35. This is the message and the count is   2
  36. This is the message and the count is   3
  37. This is the message and the count is   4
  38. This is the message and the count is   5
  39. This is the message and the count is   6
  40. This is the message and the count is   7
  41. This is the message and the count is   8
  42. This is the ending message
  43.  
  44. }
  45.