Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: main's return rule Date: Sun, 10 Dec 2017 14:39:57 -0800 Organization: None to speak of Lines: 22 Message-ID: References: <97da835b-e7df-42b5-9cc5-4d7ca935b481@googlegroups.com> <59CD49ED.7030101@dignus.com> <505425da-b024-4a06-ab30-c1b211a26cd1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="053de25614bfe886ec3f5c1ccf3bf8b4"; logging-data="4207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198f9BJUQ2ZcQW5jAPz+CNR" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:KiPAH+DkGZ4PcB99RTuqJT7JG7U= sha1:/2epoEg7Uy7RV77GkK337fzIF4w= Xref: csiph.com comp.lang.c:124113 herrmannsfeldt@gmail.com writes: > On Thursday, September 28, 2017 at 12:43:52 PM UTC-7, Keith Thompson wrote: [...] >> Unix-like systems do follow the "zero good, non-zero bad" convenion. >> I think MS Windows does too. OpenVMS, for example, does not. > > I thought OpenVMS did also, but in addition it has specific error > messages that go with some return codes. The VMS/OpenVMS convention, as I recall, is that odd return codes denote success and even codes denote failure. Since the C standard specifically requires 0 to denote success, the C runtime maps 0 to 1 -- but it doesn't map 1 to 0. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"