Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

In Computing, what is an Entry Point?

Darryl Brooks
Darryl Brooks

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.

In modular programming, such as the C++ programming language, the entry point is the beginning module.
In modular programming, such as the C++ programming language, the entry point is the beginning module.

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.

Discuss this Article

Post your comments
Login:
Forgot password?
Register:
    • In modular programming, such as the C++ programming language, the entry point is the beginning module.
      By: ビッグアップジャパン
      In modular programming, such as the C++ programming language, the entry point is the beginning module.