TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Thomas Seeling
from: Mario Semo
date: 1996-08-28 07:34:24
subject: i`m a moron

Hello Thomas,

On Aug 25 19:54 96, Thomas Seeling of 2:244/1130.42 wrote:

 TS> This is semantically nonsense. Calling exit() means leaving 
 TS> the program, sending the argument of exit() as return code 
 TS> to the calling process. The compiler might have generated 
 TS> stupid code because of void main() which negates that 
 TS> scheme.

thats not correct.

void main() 

means that main returns nothing to the caller, which is the runtime libary.
the CRT will return this value to the calling process.

calling exit() will not return to the caller (at any level) but will
immediate housekeep CRT and  shutdown the process and return the value to
the caller. 

this are 2 completly different things.


 TS> It is _bad_ _Bad_ _BAD_ _B_A_D_ to use void main().

ok. but when you declare main() as void, it is still PERFECTLY OK C/C++
code. (or show me the sentence in the ARM or the ANSI which says it is
not).

 WARPED!, Mario

--- Msgedsq/2 2.2e
* Origin: LC/32 Development Team-Vienna-Austria (2:310/14.11)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1
@PATH: 310/14 1 24/999 888 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.