Talk:Entry point

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computer science (Rated Stub-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Stub-Class article Stub  This article has been rated as Stub-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.

Moved from Entry point/new[edit]

I have moved this page from it Entry point/new as requested. It includes material originally added to the page now at Talk:Entry point/old. A history merge seems impractical, so I have left that page in that location. JPD (talk) 15:41, 9 March 2007 (UTC)

Entry point is really __start()[edit]

This page says that the entry point to a C program is main(), and phrases this as though this is the only possibility. Last I heard, the default entry point for most C compilers is __start(), and it's always customizable with a linker option. main() is usually called from within __start(), I believe. Xezlec (talk) 17:21, 10 January 2008 (UTC)

This contradicts everything I've learned in software engineering over the past 20+ years. All references on C and C++ I've read have always stated that the main() function is the entry point for every C/C++ application. They've never stated that it's a linker option. If it is, calling main() from some __start() function (which I've never heard of) is so commonplace that it has made main() the de facto entry point for every C and C++ application. This also goes for Java, BTW, and C#. — Frεcklεfσσt | Talk 13:01, 7 May 2014 (UTC)
Hello there! Please have a look at this explanation, and at this thread – those should shed some light regarding how _start() relates to main(). In a few words, main() is the high-level entry point, while _start() is the low-level entry point. — Dsimic (talk | contribs) 06:16, 8 May 2014 (UTC)
Thanks, Dsimic. But that really demonstrates that main() is the customary and default entry point for a program. Very few programmers are going to redirect the linker to use another method as the program's entry point. And as you say, main() is the high-level entry point for the program, while _start() is the low-level entry point. And in this case, the high-level language is C, not assembly. I don't think we want to explain how C works at an assembly level, just as we don't explain how computers work from the perspective of carefully organized sand. Your response doesn't argue that we should, so I assume we are on the same page, and thanks again for the links. — Frεcklεfσσt | Talk 14:23, 8 May 2014 (UTC)
You're welcome. Totally agreed, there's no point in going into that fine implementation-specific details in a Wikipedia article, especially in such a short article – if the article was like five times longer, I'd vote for including such info. At the same time, if someone needs or wants to go as low as dealing with _start(), I doubt he/she will seek for more info on Wikipedia. :) However, there's now a link in Entry point § External links section, for everyone who's interested in such things. — Dsimic (talk | contribs) 16:03, 8 May 2014 (UTC)

Long jump?[edit]

"[...] an entry point is a memory address, corresponding to a point in the code of a computer program which is intended as destination of a long jump, be it internal or external."

What is a long jump, and what is the difference between an internal long jump and an external long jump (or internal point in code/external point in code)? Thanks, --Abdull (talk) 18:46, 30 January 2010 (UTC)

Exit point?[edit]

There are mentions throughout the computer science articles of not only entry points but exit points as well. It seems they should be described together, and in terms of both entire programs and single functions. For now I'm going to redirect Entry and exit points here. --Jesdisciple (talk) 02:53, 13 June 2010 (UTC)

Extensive information loss during merge[edit]

It seems to me that a regression during the move/merge from Main function to Entry point took place such that very little information was actually merged, namely, all the information after the first sentence. See this revision for main()-like entry points [1] or this revision for an extensive list of entry points [2]. One could actually restore with very little effort or information duplication the latest of these revision of the old article to its original location while linking 'main function' in the first sentence of that article to Entry point, and if so desired placing the removed entries to this article, perhaps with a see also template pointing to Main function at the top of its new section and/or linking to it where main currently appears in the article. As one could write quite a lot about int main(...) in particular and its variants outside of Entry point, it saddens me that we've effectively removed nearly all specific information about something you'd learn in programming 101, i.e. as it stands Entry point and the redirection at Main function provide very little technical information that would be of use to someone working or who wants to work in the field, such as my kids, resulting in pointless and avoidable trips outside wikipedia had the article(s) been more comprehensive. tldr I suggest a five minute rework of overlooked unmerged information back into the wikipedia mainline. -- (talk) 05:29, 12 May 2014 (UTC)

Hello there! According to the history of Main function article and its talk page, a substantial part of its content was deleted prior to the merger (see the Talk:Main function § Languages that don't use main discussion), while it's unclear why none of that (or remaining) content was merged into Entry point later. However, thank you for pointing that out, and the content is now restored into the Entry point article – please check it out. — Dsimic (talk | contribs) 18:45, 12 May 2014 (UTC)

Basic Block[edit]

Added link to this article in the Basic block. The article is now essentially about main in various languages. Maybe we should add something regarding the more general meaning. Striepan (talk) 13:45, 9 June 2014 (UTC)

int main(void)[edit]

Does not work on all compilers. Those using calling sequences where the compiler cleans up the arguments in the return path rather than the caller will break - eg bcc in some modes. (talk) 14:04, 2 March 2016 (UTC)