Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!haven!uvaarpa!babbage!mac3n From: mac3n@babbage.acc.virginia.edu (Alex Colvin) Newsgroups: comp.lang.c++ Subject: Re: Improved switch statement Summary: wirth / dijkstra / parnas Message-ID: <480@babbage.acc.virginia.edu> Date: 3 Jan 89 14:02:00 GMT References: <1031@uqvax.decnet.uq.oz> <901@husc6.harvard.edu> <17966@glacier.STANFORD.EDU> Organization: University of Virginia Lines: 15 > Djykstra looked at this issue some years ago, and came up with > the notion of "guarded commands". See his "Algorithms + Data Structures > = Programs". Actually, A+D=P is Wirth. "Discipline of Programming" is Dijkstra's guarded command book. I believe the switch statement with case labels is Hoare's, as an alternative to the Algolish label array. Parnas combined the IF and DO guarded command sets into a IT statement that required explicit looping or exit. As to switch, if I'd wanted a long chain of tests, I could have written it that way myself.