🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3373

Re: Are all Windows programs ill-formed?

#3373
From: Max TenEyck Woodbury
Date: Tue, 20 Feb 1996 18:50
25 lines
2019 bytes
The requirement for a 'main' can NOT be built into the compiler because
a program can be split into seperatly compilable source modules.  When
compiling any given module there is no way of determining if it is the
one and only module in the program that contains 'main'.  At best the
requirement for a 'main' is a requirement on the linker.

Actually requiring a program to have a 'main' may be a problem.  What
should probably be required is a capability to have a 'main' but allow
other mechanisms that produce a comparable effect.  (No, I have no idea
how to phrase that.)

There are other extensions to be considered.  A number of UNIX based
systems allow an 'envp' as a third argument.  This seems to imply that
'main' is quite different from other C++ functions that overload on the
number and type of its arguments.  In fact, it is much closer to a 'C'
style function in its ability to handle a variable number of arguments.

        Max
---
[ To submit articles: Try just posting with your newsreader.  If that fails,
                      use mailto:std-c++@ncar.ucar.edu
  FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  Comments? mailto:std.c++-request@ncar.ucar.edu 
]
Technical Details
Message-ID: <3128D340.2308@cds.duke.edu>
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern
References: <62PO12fJcDB@faerber.muc.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern
From: Max TenEyck Woodbury <mtew@cds.duke.edu>
Newsgroups: comp.std.c++
Subject: Re: Are all Windows programs ill-formed?
Date: 20 Feb 1996 10:50:59 PST
Organization: Duke University Center for Demographic Studies
Approved: austern@isolde.mti.sgi.com
Message-ID: <3128D340.2308@cds.duke.edu>
References: <62PO12fJcDB@faerber.muc.de>
NNTP-Posting-Host: isolde.mti.sgi.com
X-Original-Date: Mon, 19 Feb 1996 14:45:04 -0500
X-Mailer: Mozilla 2.0 (Win16; I)
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBVAwUBMSoYPUy4NqrwXLNJAQHlRQH+O9Qna652AnOp3L/yM8YiUUgT+JQBZI5l
 BjnQzaZXuaVrk1yglRAfvd6lXOMmc1zdVbWBfFrSLwa48LhzdlIHqw==
 =j88b
Originator: austern@isolde.mti.sgi.com