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: 103376,99e2dadd49ce1936 X-Google-Attributes: gid103376,public From: "Marin David Condic, 407.796.8997, M/S 731-93" Subject: Re: Exception Handling Date: 1996/09/13 Message-ID: <96091317002428@psavax.pwfl.com>#1/1 X-Deja-AN: 180698588 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU x-vms-to: SMTP%"INFO-ADA@VM1.NODAK.EDU" newsgroups: comp.lang.ada x-vms-cc: CONDIC Date: 1996-09-13T00:00:00+00:00 List-Id: Felix Kasza writes: >I don't know -- but I do know that IBM's /360 architecture uses a >mechanism for OS calls which looks very much like a trap. PDPs used >similar features to handle illegal memory references. In the late 60s >or early 70s, I saw an APL interpreter for the PDP that expressly made >use of this although it didn't export the functionality to the >programmer (APL has no concept of an exception). > Well, if we include "hardware" in the picture, you'd have to go back to the very first invention of an interrupt. Assemblers, of course, let you write an interrupt handler and in that sense had "exception processing." When did it get incorporated in computer languages? That requires an answer to the question: "What exactly do you mean by 'exception processing'?" "Asynchronous transfer of control when an error is detected by the hardware or the programmer" would allow any language which gave you the ability to write an interrupt service routine and/or write a software triggered interrupt to qualify. That's most of them - except since this was always hardware dependent, it was probably not done as part of any "language standard" (more likely a vendor supplied utility). If we mean "programmer triggered exceptions" then we'd have to look to all the languages which provided some kind of syntax similar to: "ON ERROR THEN GOTO XXXX" - which would include quite a few very antiquated languages. If we mean "language triggered exceptions" (runtime checks inserted by the language translator and unseen by the programmer which may or may not include various hardware interrupts or exceptions which transfer control to a programmer specified chunk of code) then I *think* that Ada83 pretty much invented it. I am reasonably fluent in Fortran, Cobol, Pascal, C, and Ada and I have a passing knowlege of a number of more obscure languages like Lisp, Snobol, RPG, etc., and Ada was the first language I've ever encountered which included something in its syntax which meets this definition. I encountered Ada in the late '70s and discovered the exception handler at that point. One could check the Rationale for Ada 83 and some of its early design documents which would give clues as to where the language designers derived their ideas. The brain-cell I dedicated to those events reminds me that the designers looked at many other languages and didn't find "adequate" features to cover a number of requirements such as tasking, exception handling, etc. That would be a hint, but I don't trust that brain-cell much these days. MDC Marin David Condic, Senior Computer Engineer ATT: 561.796.8997 M/S 731-96 Technet: 796.8997 Pratt & Whitney, GESP Fax: 561.796.4669 P.O. Box 109600 Internet: CONDICMA@PWFL.COM West Palm Beach, FL 33410-9600 Internet: CONDIC@FLINET.COM =============================================================================== "Don't say yes until I finish talking." -- Darryl F. Zanuck ===============================================================================