entry at other than main (was: want to know)

Tim_CDC_Roberts at cup.portal.com Tim_CDC_Roberts at cup.portal.com
Wed Sep 6 05:09:13 AEST 1989


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 at cup.portal.com                | Control Data...
...!sun!portal!cup.portal.com!tim_cdc_roberts |   ...or it will control you.
 



More information about the Comp.lang.c mailing list