Bill Cunningham wrote:
> "Peter Nilsson" <> wrote in message
> news:3222fc05-7aee-4eb3-b874-...
>> Bill Cunningham wrote:
>>> I have heard that return -1 is not portable.
>> Presumably you're talking about the return value from main()?
>
> Yes. Would return -1 from a function other than main be ok? I'm guessing
> no but I thought I'd ask.
>
> Bill
>
>
Obviously returning -1 from ANY function (including main)
is portable and well defined by the language.
Now, returning -1 from main could be interpreted by the OS
(when there is one) in different ways and could be non
portable in the sense that it could mean different things in
different OSes.
But this is after main returns, so it is no longer a C problem.
By the way, I find all this discussion completely stupid sorry.
What do you have against -1???
It is just as good a number as 1, or 4477665 for that matter.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32