Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!usc!ginosko!uunet!portal!cup.portal.com!Tim_CDC_Roberts From: Tim_CDC_Roberts@cup.portal.com Newsgroups: comp.lang.c Subject: Re: entry at other than main (was: want to know) Message-ID: <21897@cup.portal.com> Date: 5 Sep 89 19:09:13 GMT References: <19474@gryphon.COM> Distribution: na Organization: The Portal System (TM) Lines: 22 Let me give an example of a case where "main" as main program possibly makes an inconvenience. Take Control Data (...please). On our systems, after compiling and linking a set of object routines, you end out with an executable file. This executable can then be placed into a LIBRARY with many other executables. If all the executables have the same entry point name (main or crt0 or _start_up or whatever), how do you designate which executable in the current library you wish to invoke? This is solvable, of course, by modifying the librarian to allow the user to specify a main_program_name, or by using the file name instead of an entry point. I'm not advocating changing C. Our scheme was developed when FORTRAN (PROGRAM ABCD1), COBOL (ID DIVISION...PROGRAM-NAME IS ABCD2.), and even Pascal (PROGRAM ABCD3;) were popular. But adding C to the list does require some rethinking. Tim_CDC_Roberts@cup.portal.com | Control Data... ...!sun!portal!cup.portal.com!tim_cdc_roberts | ...or it will control you.