TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: David Nugent
from: Paul Edwards
date: 1994-12-01 23:41:46
subject: main

>> ac> int main(void)

 >> I have only started programming in C so I haven't used that can you
 >> tell me the advantages of that compared to "void main()"

 DN> "void main()" does not conform with the ISO standard. Put
simply, it still
 DN> 'works' with most (all?) compilers, but there is no guarantee that any
 DN> conforming implementation need do so or will. "void
main()" is often used
 DN> in books which were written prior 1989 (when ANSI-C became standard) or
 DN> written by folks who learned C before 1989.
 
That's not what I thought the situation was.  Back in the olden
days they didn't even have a "void" data type, as ints and
generally ignoring things worked instead.  It is only since
Borland started giving warnings about not returning a value
from main that I saw people find this "neat trick"  to
get around the warning.  Warnings about something like that
would have been unthinkable back in the olden days.  However,
that is only my understanding of the situation, as I only
started in about 1987.  BFN.  Paul.
@EOT:

--- Mksmsg
* Origin: none (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™.