comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: How to exit an Ada program with (unix shell) error code?
Date: Wed, 06 May 2009 13:41:51 +0200
Date: 2009-05-06T13:41:52+02:00	[thread overview]
Message-ID: <4a017780$0$30223$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <254636ac-f108-45b3-91c6-35bdae0ef562@o14g2000vbo.googlegroups.com>

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.



      reply	other threads:[~2009-05-06 11:41 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-04  9:08 How to exit an Ada program with (unix shell) error code? reinkor
2009-05-04  9:17 ` Samuel Tardieu
2009-05-04  9:26   ` reinkor
2009-05-04  9:31     ` Ludovic Brenta
2009-05-04  9:47       ` reinkor
2009-05-04  9:54         ` Martin
2009-05-04 11:38           ` sjw
2009-05-04 10:07       ` stefan-lucks
2009-05-04 13:42     ` Robert A Duff
2009-05-04 16:19       ` Martin
2009-05-07  9:48         ` anon
2009-05-04 16:09 ` anon
2009-05-05 10:49   ` Rob Norris
2009-05-05 11:15     ` Georg Bauhaus
2009-05-05 11:43   ` Martin
2009-05-05 14:57     ` Adam Beneschan
2009-05-05 15:34       ` Jean-Pierre Rosen
2009-05-06 15:28         ` Adam Beneschan
2009-05-06 22:10           ` Randy Brukardt
2009-05-07  9:08           ` anon
2009-05-07 10:01             ` Georg Bauhaus
2009-05-07 11:22               ` anon
2009-05-07 12:08                 ` Martin
2009-05-07 13:34                 ` Georg Bauhaus
2009-05-07 16:26             ` Adam Beneschan
2009-05-08 10:17               ` anon
2009-05-12 22:55                 ` Adam Beneschan
2009-05-14  2:55                   ` anon
2009-05-14  8:04                     ` Martin
2009-05-14  8:39                     ` Martin
2009-05-14  8:45                       ` Martin
2009-05-14  9:34                       ` Ludovic Brenta
2009-05-14 10:05                         ` Martin
2009-05-14 12:38                           ` Georg Bauhaus
2009-05-14 15:34                     ` Adam Beneschan
2009-05-15 10:20                       ` anon
2009-05-15 11:19                         ` Martin
2009-05-05 20:48       ` anon
2009-05-05 21:01         ` Adam Beneschan
2009-05-06 11:30         ` Hibou57 (Yannick Duchêne)
2009-05-05 20:31     ` anon
2009-05-05 21:27       ` Martin
2009-05-06  8:41         ` anon
2009-05-06  9:14           ` Martin
2009-05-06 11:41             ` Georg Bauhaus [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox