Path: utzoo!attcan!utgpu!watmath!iuvax!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.c Subject: Re: want to know Summary: Not general enough Message-ID: <1506@l.cc.purdue.edu> Date: 17 Aug 89 14:55:57 GMT References: <8487@bsu-cs.bsu.edu> <2980@solo9.cs.vu.nl> <21309@cup.portal.com> Distribution: na Organization: Purdue University Statistics Department Lines: 33 In article <21309@cup.portal.com>, Tim_CDC_Roberts@cup.portal.com writes: > Regarding the 'Why is main called main()?' fiasco: > > If this was a joke, then I was taken in, because I penned a four paragraph > beginner-style response to this message. > > There are pros and cons to the main_as_default_transfer_address scheme, > of course. If you allowed any label to be the transfer address, then you > would need some kind of syntax to specify what to use: > > main (int argc, char ** argv) { .... > > could become > > transfer int entry_point (int argc, char ** argv) { ... This is not adequate. I have used systems where only one program card was used, and it needed the explicit list of program arguments, but one could still transfer to any other entry point. Of course, this did not use argc and argv. In C, one could start an arbitrary program with int argc; char** argv; program(........) to handle the problem. If this does not work (I have not tried it), put the handling of argc and argv in the loader. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)