want to know
ody
davidsen at sungod.crd.ge.com
Wed Aug 16 23:56:22 AEST 1989
In article <1496 at l.cc.purdue.edu> cik at 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 at crdos1.crd.GE.COM)
{uunet | philabs}!crdgw1!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me
More information about the Comp.lang.c
mailing list