From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,8be18979db11f51c X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,fb631c9316319fef X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-02-28 08:10:07 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!news-hog.berkeley.edu!ucberkeley!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!sjc1.nntp.concentric.net!newsfeed.concentric.net!global-news-master From: "Rick Cadruvi" Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: Drop C/C++ better sooner than later Date: 28 Feb 2001 16:05:22 GMT Organization: Concentric Internet Services Message-ID: <97j7k2$se2@dispatch.concentric.net> References: <87n1baae6s.fsf@prep.synonet.com> <97bm3a$7tv@gap.cco.caltech.edu> <3A99AED0.5DF07890@infopuls.com> <97cd06$hcn$1@pyrite.mv.net> <97egck$vc6$3@info.cs.uofs.edu> <3A9AEFCD.AFC8431@infopuls.com> <97etsu$j41$1@pyrite.mv.net> <3A9B023A.CBD414A5@infopuls.com> <97hvro$hj4@freepress.concentric.net> <3A9CA5B0.3614CAE7@videotron.ca> NNTP-Posting-Host: 64.0.157.124 X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: supernews.google.com comp.os.vms:20527 comp.sys.dec:2913 I don't disagree that the concept is useful. I just think that BREAK should be automatic and you should use a CONTINUE to drop through since you almost ALWAYS want to BREAK. Rick... "JF Mezei" wrote in message news:3A9CA5B0.3614CAE7@videotron.ca... > re: switch / case: > > I have had occasions where I did make use of the lack of automatic "break" at > the end of a case statement. > > Think of a dishwasher: > > > switch(wash_type) > { > case heavy_duty: > fill_tank(); > wash(5 minutes, no_spoap, no_rinse_agent); > empty_tank(); > case very_dirty: > fill_tank(); > wash(5 minutes, no_spoap, no_rinse_agent); > empty_tank(); > case regular: > fill_tank(); > wash(10 minutes, spoap, no_rinse_agent); > empty_tank(); > > case rinse: > fill_tank(); > wash(10 minutes, no_spoap, rinse_agent); > empty_tank(); > dryer(15 minutes); > break; > > case rinse_only: > fill_tank(); > wash(5 minutes, no soap, no rinse agent); > empty_tank(); > break; > > case dish_warmer: > dryer(5 minutes); > break; > > > > So, in the case of a heavy_duty wash, it will fall down all the way to the end > of the rinse and then stop.