From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: C is 'better' than Ada because... Date: 1996/07/26 Message-ID: <4ta4s6$ic3@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 170232191 references: <31daad10.57288085@netline-fddi.jpl.nasa.gov> <31ebfbd7.330061022@netline-fddi.jpl.nasa.gov> <31EE19D1.6977@lfwc.lockheed.com> <31efe069.63062188@netline-fddi.jpl.nasa.gov> <4sopkp$dao@itfhps00.itf.hcsd.ca> <31f3c396.238311543@netline-fddi.jpl.nasa.gov> <31f4fa31.317828803@netline-fddi.jpl.nasa.gov> <4t72fl$22d@mulga.cs.mu.OZ.AU> <31f7db04.80562082@netline-fddi.jpl.nasa.gov> organization: Comp Sci, University of Melbourne newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-26T00:00:00+00:00 List-Id: kdq@emoryi.jpl.nasa.gov (Kevin D. Quitt) writes: >On 25 Jul 1996 05:59:17 GMT, fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) wrote: >>>Do *you* know what COBOL's >>> equivalent of BASIC's "ON x GOTO..." is? >> >>Oh, you mean >> >> evaluate x > >No, that's like C's switch statement. Well, you're right that COBOL's evaluate statement isn't the exact equivalent of BASIC's "ON x GOTO..." statement, even though it is what a modern COBOL programmer would probably use for the same sort of thing. But it's not equivalent to C's switch statement either -- C's switch statement is much more low-level and primitive in comparison, really. (For example, you can't switch on strings.) The exact COBOL equivalent of BASIC's "ON x GOTO ..." is the goto ... depending on x statement, which has pretty much identical semantics. >COBOL uses self-modifying code for computed gotos. I suppose you'd be referring to a feature of some ancient version of COBOL that was deprecated years before C was ever standardized? -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.