Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!emory!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.lang.c Subject: Re: problems/risks due to programming language Message-ID: <8140@hubcap.clemson.edu> Date: 23 Feb 90 21:39:40 GMT References: Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 29 From bitbug@lonewolf.sun.com (James Buster): > I claim that the possibly erroneous replication of code > required by the Ada case statement, e.g. > % -- in approximate Ada style as compared to C's % switch foo is switch foo % case 5 => { % statement1; case 5: % statement2; case 7: % statement3; statement1; % case 7 => statement2; % statement1; statement3; % statement2; } % statement3; % end > > is well worth remembering to put in break statements. Until one discovers that Ada enables the following construction: case foo is [...] when 5 | 7 => statement1; statement2; statement3; end case; Bill Wolfe, wtwolfe@hubcap.clemson.edu