want to know

Tom Tkacik tkacik at rphroy.UUCP
Wed Aug 16 23:13:44 AEST 1989


In article <1496 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:
>> >> I'm also a University's student in need of help. I always see that people
>> >> define the function 'main' in C-programs. Why is that? What should it
>> >> return?  Can't I use another name?

>                                 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 even moderately fair reason why the user's program should start
>at main (or _main if from C, or _MAIN_ if from Fortran).

The pANS C got rid of the still born keyword 'entry'.
Maybe it had no meaning, or was to mean something completely different,
but my interpretation of it was to give the entry point into the program,
if you did not like main.

Maybe something like:

entry start();

start()
{
	/* this is now the main routine */
}

Does anybody know what 'entry' was supposed to do?

---
Tom Tkacik		GM Research Labs,   Warren MI  48090
uunet!edsews!rphroy!megatron!tkacik
"If you can't stand the bugs, stay out of the roach-motel."  Ron Guilmette
-- 
---
Tom Tkacik		GM Research Labs,   Warren MI  48090
uunet!edsews!rphroy!megatron!tkacik
"If you can't stand the bugs, stay out of the roach-motel."  Ron Guilmette



More information about the Comp.lang.c mailing list