TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mario Semo
from: Thomas Seeling
date: 1996-08-30 00:17:36
subject: i`m a moron

Hallo, Mario!

*** Am 28. August 1996 um 07:34 schrieb Mario Semo an Thomas Seeling:

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

 MS> code. (or show me the sentence in the ARM or the ANSI which says it is
 MS> not).

The ISO-standard defines exactly two variants of main():

int main(void)
int main(int,char**)

This holds true for the ARM, too. Additionally, ARM states that main()
cannot be called recursively, the address of main() cannot be taken, main
may not be static or inline and some other restrictions (reference part of
ARM, R3.4 in my german edition about "program startup and
ending").

IMHO it is always desirable to keep up with standards. I don't really need
to adhere to ISO-C, but it definitely eases development and brings me to
think about "strange" language constructs. A lot of my sources
could be ported to our workstation later (AIX and SGI) without too much
work, and of course it is maintenance friendly if colleagues have to
continue with my projects.


Tschau...Thomas

--- E3-32/1.11-32/2.50+
* Origin: Die TeX-Box +49-6034-930021 V.34 -930022 ISDN 24h (2:244/1130.42)
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: 244/1130 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™.