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 Path: g2news2.google.com!postnews.google.com!v23g2000pro.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: How to exit an Ada program with (unix shell) error code? Date: Tue, 12 May 2009 15:55:39 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <49ba30c9-a1e6-4346-8618-d256f87ac301@s31g2000vbp.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1242168939 2864 127.0.0.1 (12 May 2009 22:55:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 12 May 2009 22:55:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v23g2000pro.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5802 Date: 2009-05-12T15:55:39-07:00 List-Id: On May 8, 3:17 am, a...@anon.org (anon) wrote: [Note: I was out of town for a long weekend, for Mother's Day, and saw this post just today.] > Now, in the case of, Ada.Command_Line, RM A.15 (21) states: > > 21 An alternative declaration is allowed for package Command_Line if > different functionality is appropriate for the external execution > environment. OK, I wasn't aware of this. But it doesn't help your case any. In the post to which I was responding, you said: "And since there are times where the Ada.Command_Line package is not available, there has to be a way to send a 'exit status' to the OS in those case." If the OS is such that it expects programs to return an exit status, then certainly an alternative (or omitted) declaration of Ada.Command_Line that did not support Set_Exit_Status would not be "appropriate for the external execution environment". (It would only be appropriate in cases where there is no real OS, or if there's a bare-bones OS that does not care about exit statuses.) I think the point you're trying to make is that the language should *require* support for parameterless functions as main programs, but you still haven't demonstrated your point; ignoring cases where the vendor just plain screws up by providing an inappropriate version of Command_Line, you have not shown that there is ever a need to support main programs of this form. -- Adam