TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Geoff Reynolds
from: Paul Edwards
date: 1995-04-29 23:16:54
subject: EMX main()

MR> Does anyone know why the EMX compiler insists that the 
MR> main function has to 
MR> return an integer?  It won't accept void as the return type.

GR> Because it is an error for main to return anything other than an int. Some 
GR> other compilers don't catch this error :-)

It's amazing how many people aren't aware of how to even
code a "hello, world" program in C!  Check out the Watcom
docs, they use "void main" too.  It's disgusting.  I even
mentioned it to Watcom, but they certainly didn't change
it in 10.0a (going from 10.0).  I've also seen some IBM 
stuff do the same thing (in the PC environment).  Never saw
them do that on the mainframe though.  C/370 was a 
beautifully clean compiler.  Practically no extensions
whatsoever.  Totally 100% ISO conforming, but no open(),
stricmp() etc.  BTW, Borland C++ 1.5 documents stricmp() as
being ANSI C.  ROFL!  BFN.  Paul.
@EOT:

---
* Origin: Kludging up the works (3:711/934.9)

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™.