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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6ee8ca03c176d76 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-29 12:32:44 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!nyc.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: stupid question: how can I finish a program? Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Thu, 29 Aug 2002 19:32:13 GMT References: NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:28575 Date: 2002-08-29T19:32:13+00:00 List-Id: "Marin D. Condic" writes: > Just because there is no absolutely safe or absolutely portable or > absolutely consistent way of doing something in Ada, doesn't mean it > shouldn't be done. A complaint that a lot of C programmers have about Ada is > that it keeps stoping them from doing what they want to do. Sometimes that > is a good thing, but sometimes its just plain stubbornness on the part of > Ada insisting that because an answer isn't "perfect" that it won't provide > one that is "good enough". Providing a portable interface to what ANSI C > calls "abort();" (and similar...) doesn't sound like something that should > be avoided just because it might be misused or that the results might not be > consistent across all platforms. I very much agree with that. This kind of reasoning is how we got things like Ada.Command_Line and Get_Immediate into the language. Sure, they're not 100% portable -- they can't be, because they interface with the outside world. But in this case, I can't get too excited about a "standard" version. Why not pragma-Import "exit" or "abort", and use that? That's portable enough, in practise. I have done this (knowing full well what resources my program is meddling with), and gotten it working just fine, with the identical code working on Solaris, Linux, and Windows. It might not work on some embedded board, but this particular program was not an embedded program. It also uses sockets, for example, which I don't expect to be available in the chip that controls a toaster or an airplane. - Bob