No gotos in Bourne shell

Daniel R. Levy levy at ttrdc.UUCP
Mon Apr 18 07:16:48 AEST 1988


In article <1988Apr16.223658.15649 at utzoo.uucp>, henry at 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 @        |  	<most AT&T machines>}!ttrdc!ttrda!levy
|     AT&T Data Systems Group    |  Disclaimer?  Huh?  What disclaimer???
|--------Skokie, Illinois--------|



More information about the Comp.lang.c mailing list