Path: utzoo!mnetor!uunet!ncc!alberta!att-ih!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: comp.lang.c Subject: No gotos in Bourne shell Message-ID: <2592@ttrdc.UUCP> Date: 17 Apr 88 21:16:48 GMT References: <1988Apr11.201934.20594@utzoo.uucp> <451@goofy.megatest.UUCP> <1988Apr16.223658.15649@utzoo.uucp> Organization: AT&T, Skokie, IL Lines: 24 In article <1988Apr16.223658.15649@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: # > <>...And I know of no language, with the possible exception of Ada, that is # > <>rich enough in control structures to always have an elegant and # > <>efficient alternative to using a goto. # > # > Check out BLISS... # # Don't forget the Unix shell. (The standard one, not the silly thing from # Berkeley.) To use some of your prior terminology, it is "amusing" to "note" that the Bourne shell supports `break n'. Without a goto and (until System V) without functions, this is the only way to leave nested loops without having to introduce extraneous variables. In an interpreted language like sh, extraneous variables really cost. It is also "amusing" to "note" that DEC has done right well with its DCL which has yet to support a loop constructor of any kind other than GOTO. VMS? I hear you say? What's THAT?!?!? -- |------------Dan Levy------------| Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, | an Engihacker @ | }!ttrdc!ttrda!levy | AT&T Data Systems Group | Disclaimer? Huh? What disclaimer??? |--------Skokie, Illinois--------|