From -4991154129363012
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,a7bb6560624ae2c1
X-Google-Attributes: gidf78e5,public
From: James.Kanze@dresdner-bank.com
Subject: Re: More M$ Not Conforming points...
Date: 1999/08/28
Message-ID: <7q62em$gk6$1@nnrp1.deja.com>#1/1
X-Deja-AN: 518171146
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7ps1sg$dev$1@nnrp1.deja.com> <7pu4es$1mv3$1@news.hal-pc.org> <7q0q07$op0$1@nnrp1.deja.com> <37C5571F.CE3802EE@physik.tu-muenchen.de>
X-Original-Date: Fri, 27 Aug 1999 13:05:34 GMT
X-Http-User-Agent: Mozilla/4.06 [de] (WinNT; I)
X-Complaints-To: news@news.unimelb.edu.au
X-Http-Proxy: 1.0 x24.deja.com:80 (Squid/1.1.22) for client 193.194.7.84
X-Trace: izvestia.its.unimelb.edu.au 935843766 16287 128.250.29.17 (28 Aug 1999 12:36:06 GMT)
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Fri Aug 27 13:05:34 1999 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN8fXoOEDnX0m9pzZAQEYbQF+JkvqL/jDNLBcwk/NMjIMZdoyxhlBVgQB DGb2aemeIpF6jRwJwHlnea2/IxGFmxel =MV5i
X-MyDeja-Info: XMYDJUIDkanze
NNTP-Posting-Date: 28 Aug 1999 12:36:06 GMT
Newsgroups: comp.std.c++

In article <37C5571F.CE3802EE@physik.tu-muenchen.de>,
  Christopher Eltschka <celtschk@physik.tu-muenchen.de> wrote:

> PS: Does anyone use "return EXIT_SUCCESS;"?

I usually use "return ProgStatus.instance().returnCode()".  What it maps
to in case of success is platform dependant -- the default is
EXIT_SUCCESS, but the Unix implementation uses 0.

The reason is simple: I have my own return codes: SUCCESS, WARNING,
ERROR, FATAL, INTERNAL.  The default mapping is for the first two to map
to EXIT_SUCCESS, and the others to EXIT_FAILURE.  Under Unix, however,
they map to assending integers.  And WARNING is a bad name, because it
is really a second success, used for cases like grep, where you return 1
if you don't find any matches.

--
James Kanze                   mailto: James.Kanze@dresdner-bank.com
Conseils en informatique orient�e objet/
                  Beratung in objekt orientierter Datenverarbeitung
Ziegelh�ttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



