We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

In Computing, what is an Entry Point?

By Darryl Brooks
Updated: May 16, 2024
Views: 15,434
Share

In computers, an entry point is the point in a program, module or function where the code begins; specifically, the memory address where it begins. In a program, it is the first module of code, or even the first line of code that is executed. In a program that is linear, such as BASIC or COBOL, the entry point literally is the first line of code. The code then follows sequentially until some sort of jump or call is executed. In modular programming, such as all of the variants of the C programming language, the entry point is the beginning module. In C, this is the “Main()” function.

In older programs and operating systems, a program could have multiple entry points, depending on the function or system that was being executed. In most modern operating systems, including Windows® and Unix, programs are written in languages that support a single entry point. Even in the early days of modern computing, languages such as BASIC, while having a single entry point to the program, might support “long jumps,” where the program might "jump" from one module to the entry point of another module indiscriminately. This encouraged was what called “spaghetti code,” which was difficult to maintain or modify.

An entry point might not even refer to the entry point of a program but can be the entry point of a dynamic link library (DLL), which are sort of mini-programs that are shared across other programs. A DLL that controls keyboard input is one example. Regardless of the type of program, module or function, the entry point is the single point at which processing beings in that piece of code. The key to understanding any language or modifying and supporting any program lies in understanding how the entry point is identified in that specific program or operating system.

The concept of entry points was implemented when computer programming left the completely linear methods of the early days. In those times, a computer program began on the first line of code and proceeded one line at a time to the end of the process. Soon, programming constructs such as looping, conditional branching, recursion and others created programs that were functionally more efficient, but the processing bounced all over the place within the code. The nature of these programs means that there might be many lines or sections of code before the point where the processing actually begins. For this reason, the entry point was created and identified.

In C, this became the main() function. Regardless of where this function existed in the code, that is where the processing began. In other languages, entry points are not identified by so much as where they are but by where they are not. The beginning of the program might contain sections of variable declarations and sub-routines. The first line of code following these areas or functions, by default, becomes the entry point.

Share
EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Discussion Comments
Share
https://www.easytechjunkie.com/in-computing-what-is-an-entry-point.htm
Copy this link
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.