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-Thread: a07f3367d7,14aa27db81ce3b40 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cyclone1.gnilink.net!gnilink.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 06 May 2009 13:41:51 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to exit an Ada program with (unix shell) error code? References: <49ba30c9-a1e6-4346-8618-d256f87ac301@s31g2000vbp.googlegroups.com> <948d6a6b-d603-4e38-add2-50016c2dcc9d@s20g2000vbp.googlegroups.com> <254636ac-f108-45b3-91c6-35bdae0ef562@o14g2000vbo.googlegroups.com> In-Reply-To: <254636ac-f108-45b3-91c6-35bdae0ef562@o14g2000vbo.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a017780$0$30223$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 06 May 2009 13:41:52 CEST NNTP-Posting-Host: 6dc187a2.newsspool1.arcor-online.net X-Trace: DXC=01fnTejOGA;RLigj];iP=8ic==]BZ:af>4Fo<]lROoR1^YC2XCjHcb9OC6l0LBaU`?;9OJDO8_SK6NSZ1n^B98i:Wdib1@3MYW2 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5705 Date: 2009-05-06T13:41:52+02:00 List-Id: Martin schrieb: > On May 6, 9:41 am, a...@anon.org (anon) wrote: >> By your logic, who said procedures are portable! > > Perhaps you could rephrase that into a meaning sentence? > > >> Using RM 10.2 (29), a >> vendor could easily restrict the "main subprograms" to functions only. > > No they can't - read the sentence begining "However". In fact, here it > is: > > "However, an implementation is required to support all main > subprograms that are public parameterless library procedures." Indeed, and why would anyone want to use compiler hacks when there is a prefectly well documented standard solution involving exit codes? A competition with C programmers? Like, "I, an Ada programmer, can play the same tricks, in Ada, as you can in C, no hassle at all? I'm just as clever as you are because, me too, can rely on compiler docs and platform conventions for dealing with int as return codes?" Goodness. What is wrong with the standard, if naturally implementation-defined, Exit_Status that *guarantees* the OS will be able to deal with it? Doing otherwise (i.e. trying to use a function instead) might force rewriting the function as a main procedure and call Set_Exit_Status when switching compilers. So what is the point? Use Ada, even when your compiler is GNAT.