want to know
Tim_CDC_Roberts at cup.portal.com
Tim_CDC_Roberts at cup.portal.com
Wed Aug 16 02:03:44 AEST 1989
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) { ...
The problem with this is that it requires a re-think of the startup code
issue. One precedent (FORTRAN) would be to have the _transfer_ entry point
(called 'entry_point' above) actually be the loader transfer address, and
have the compiler insert a call to startup code in any function with a
_transfer_ modifier.
However, IMHO, the 'main' idea is conceptually cleaner.
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