Default User <> wrote:
>Ben Pfaff wrote:
>> Default User <> writes:
>> > Zygmunt Krynicki wrote:
>> > > On Fri, 03 Oct 2003 23:59:49 -0400, Al Bowers wrote:
>> > >
>> > > > return 0;
>> > >
>> > > return EXIT_SUCCESS;
>> >
>> > They mean the same thing.
>>
>> Yes. However, they are not necessarily equal.
>
>However, it was not a reasonable correction of the posted code.
Your point is well taken because the two are both equally
acceptable per the Standard, which says,
5 Finally, control is returned to the host environment.
If the value of status is zero or EXIT_SUCCESS, an
implementation-defined form of the status successful
termination is returned. If the value of status is
EXIT_FAILURE, an implementation-defined form of the status
unsuccessful termination is returned. Otherwise the status
returned is implementation-defined.
To me that indicates (as far a C is concerned) there are only
two possible values of status that can be returned, _successful_
and _unsuccessful_. And either a "zero or EXIT_SUCCESS" result
in a unique, singular _successful_ status, making them
necessarily equal.
However, Ben Pfaff is certainly teasing us with something
specific in mind, and I would like to hear him expand on it
because obviously there is more to this than I'm seeing.
--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)