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

  1.                                 (* Chapter 4 - Program 9 *)
  2. program A_Bigger_Case_Example;
  3.  
  4. var Count : integer;
  5.     Index : byte;
  6.  
  7. begin  (* main program *)
  8.    for Count := 1 to 10 do begin
  9.       Write(Count:5);
  10.          case Count of
  11.            7..9  : Write(' Big Number');
  12.            2,4,6 : begin Write(' Small');
  13.                          Write(' even');
  14.                          Write(' number.');
  15.                    end;
  16.            3 : for Index := 1 to 3 do Write(' Boo');
  17.            1 : if TRUE then begin Write(' TRUE is True,');
  18.                                   Write(' and this is dumb.');
  19.                             end;
  20.          else Write(' This number is not in the allowable list');
  21.          end; (* of case structure *)
  22.       Writeln;
  23.    end;  (* of Count loop *)
  24. end.  (* of main program *)
  25.  
  26.  
  27.  
  28.  
  29. { Result of execution
  30.  
  31.    1 TRUE is true, and this is dumb.
  32.    2 Small even number.
  33.    3 Boo Boo Boo
  34.    4 Small even number.
  35.    5 This number is not in the allowable list
  36.    6 Small even number.
  37.    7 Big number
  38.    8 Big number
  39.    9 Big number
  40.   10 This number is not in the allowable list
  41.  
  42. }
  43.