🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.vms
Article #15635

Re: Successful and not successful completion

#15635
From: Dan Pop
Date: Sat, 12 Aug 1995 00:00
32 lines
2618 bytes
In <40jajf$mt0@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:

>In article <danpop.808262674@rscernix>, Dan.Pop@mail.cern.ch (Dan Pop) writes:
>=In <40iqa1$4eg@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>=
>=>43, F for 44, and ? for 45-47.  Similarly, messages 1-7 are
>=>"%SYSTEM-x-NORMAL, normal successful completion", while 0 is
>=>"%NONAME-W-NOMSG, Message number 00000000".  Note:  The C RTL, in a fit of
>=>accomodation to Unix, converts an exit status of zero to 1.
>=
>=Nope.  It does this in a fit of ANSI/ISO C compliance.  Before the ANSI
>=standard (and some time after :-) the VMS C RTL couldn't care less about
>=the Unix conventions WRT exit status codes.
>
>Hmmm.  I thought the ANSI standard required that a successful exit status be
>defined by keyword.  The exit() function in the VAX C RTL converted zero to one
>before the ANSI standard was adopted.  return, on the other hand, left the
>value untouched.

The ANSI standard guarantees that returning a value from (the initial
invocation of) main() has the same effect as calling exit() with that
value as argument.  This is what DEC C does nowadays.  ANSI also
guarantees that 0 and EXIT_SUCCESS have the same effect when passed to
exit(), but it doesn't require that EXIT_SUCCESS is defined as 0 (and
DEC C for OpenVMS doesn't define EXIT_SUCCESS as 0).

Dan
--
Dan Pop
CERN, CN Division
Email: Dan.Pop@mail.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Technical Details
Message-ID: <danpop.808270264@rscernix>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <40bn8l$a1c@caip.rutgers.edu> <40iqa1$4eg@gap.cco.caltech.edu>,<danpop.808262674@rscernix> <40jajf$mt0@gap.cco.caltech.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f7344,eea6b6bd6eb0c914
X-Google-Attributes: gidf7344,public
X-Google-Thread: 10f8a1,eea6b6bd6eb0c914
X-Google-Attributes: gid10f8a1,public
X-Google-Thread: f7cd1,eea6b6bd6eb0c914
X-Google-Attributes: gidf7cd1,public
X-Google-Thread: fce85,eea6b6bd6eb0c914
X-Google-Attributes: gidfce85,public
X-Google-Thread: 1164f8,eea6b6bd6eb0c914
X-Google-Attributes: gid1164f8,public
X-Google-Thread: 104528,eea6b6bd6eb0c914
X-Google-Attributes: gid104528,public
From: Dan.Pop@mail.cern.ch (Dan Pop)
Subject: Re: Successful and not successful completion
Date: 1995/08/12
Message-ID: <danpop.808270264@rscernix>
X-Deja-AN: 108033767
sender: news@news.cern.ch (USENET News System)
x-nntp-posting-host: ues5.cern.ch
references: <40bn8l$a1c@caip.rutgers.edu> <40iqa1$4eg@gap.cco.caltech.edu>,<danpop.808262674@rscernix> <40jajf$mt0@gap.cco.caltech.edu>
organization: CERN European Lab for Particle Physics
newsgroups: comp.os.vms,comp.sys.dec,bit.listserv.vmslsv-l,vmsnet.alpha,vmsnet.misc,vmsnet.vms-posix,poster