Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!crdgw1!sungod!davidsen
From: davidsen@sungod.crd.ge.com (ody)
Newsgroups: comp.lang.c
Subject: Re: want to know
Message-ID: <1701@crdgw1.crd.ge.com>
Date: 16 Aug 89 13:56:22 GMT
References: <8487@bsu-cs.bsu.edu> <2980@solo9.cs.vu.nl> <182@sunquest.UUCP> <14269@haddock.ima.isc.com> <1496@l.cc.purdue.edu>
Sender: news@crdgw1.crd.ge.com
Reply-To: davidsen@crdos1.UUCP (bill davidsen)
Organization: General Electric Corp. R&D, Schenectady, NY
Lines: 23

In article <1496@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes:

| No, the question is not a JOKE.  It is a stupidity in UNIX which causes the
| problem.  I have used other systems in which the main program could have
| any name whatever, and even in which the entry need not be to a main program,
| while a main program is present.  I have even used it.

  There is no main program in C. There is a procedure named main. In
FORTRAN the main program is diferent from a subroutine or function, in C
it just happens to have a special name.

  If you really want to have a program which enters somehere else write
a dummy main:
	main(argc, argv, env)
	int argc;
	char *argv, *env;
	{ exit(yourname(argc, argv, env)); }

  I totally fail to see what the advantage of using another name is, but
I'm sure someone finds it aestheticaly (sp?) pleasing.
	bill davidsen		(davidsen@crdos1.crd.GE.COM)
  {uunet | philabs}!crdgw1!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me