*/
Check out and contribute to CodePedia, the wiki for developers.
*/

View \CASEDEMO.PAS

This is the second disk of the PASCAL TUTOR system. It has the

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


(* Chapter 4 - Program 8 *)
program Demonstrate_Case;

var Count : integer;

begin  (* main program *)
   for Count := 0 to 8 do begin
      Write(Count:5);
         case Count of
           1 : Write(' One');    (* Note that these do not have *)
           2 : Write(' Two');    (* to be in consecutive order *)
           3 : Write(' Three');
           4 : Write(' Four');
           5 : Write(' Five');
         else Write(' This number is not in the allowable list');
         end; (* of case structure *)
      Writeln;
   end(* of Count loop *)
end(* of main program *)

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.