Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: Big Deal with returning int

Reply
Thread Tools

Re: Big Deal with returning int

 
 
Samuele Armondi
Guest
Posts: n/a
 
      06-29-2003
"Julián Albo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Samuele Armondi escribió:

> systems. Obviously, most compilers will be smart enough to substitute int
> main() for void main() and add a return 0; to the end of it, but it

defeats
> the purpose of returning a value at all, does it not?


The compilers i use in ms-dos (time ago) does not add a return 0. void
main is called just like int main, and the value returned is whatever is
in the ax register.

Regards.

Even more reason to use int main(). "whatever is in the ax register" does
not give the OS any information as to whether or not the code was
successful.
S. Armondi



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Big Deal with returning int Kelsey Bjarnason C++ 38 07-01-2003 10:24 PM
Re: Big Deal with returning int Jonathan Clements C++ 7 07-01-2003 04:42 PM
Re: Big Deal with returning int John Harrison C++ 5 06-30-2003 12:06 PM
Re: Big Deal with returning int Rolf Magnus C++ 0 06-29-2003 11:47 AM
Re: Big Deal with returning int Ian C++ 0 06-29-2003 07:29 AM



Advertisments