What Is Initialization

Table of contents:

What Is Initialization
What Is Initialization

Video: What Is Initialization

Video: What Is Initialization
Video: What is Initialization 2024, November
Anonim

"Initialization" is not only a complex "scientific" word, but also a frequently encountered process. The work of computing technology is entirely based on the initialization of various variables. What is hidden behind this difficult term?

What is initialization
What is initialization

Definition

By definition, "initialization" is the preparation of a program or hardware device for operation. This preparation consists in setting the initial data for the system parameters. For a program, initialization is the assignment of values to program variables.

Data array initialization

Array initialization has a number of pitfalls. First, in different software environments, filling in the array data begins either from the zero element A [0], or from the first A [1], where A is the name of the array.

To initialize an array, a "step-by-step" for (foreach) loop is usually used. The array is filled up gradually, one element at a time during each "run" of the cycle. In the for loop, a local loop variable is created to control the number of passes.

The initial value of the loop variable must match the first element of the array: A [0] or A [1]. The final one is with the number of array elements.

To organize the filling with data of a two-dimensional array, you need to nest one for loop in another. Thus, the operation of looping through a column of the array will be performed as many times as there are in the array of strings.

Initialization errors

During initialization, the system receives data from all relevant devices, processes or operators. Starting the operating system is the initialization of data, because the operating system receives responses from all parts of the computer, including the RAM, hard drive, and keyboard. If one of the important blocks is missing, the OS will not be able to initialize. The well-known Blue Screen of Death is also a serious initialization error.

Initialization string

Newbies often use simple calls (e.g. X = 5) or manual selection to control initialization. However, regular initialization is necessary and can be automated.

Suppose you have a computer user connected to two ISPs. The connection speed changes, so the user is constantly switching manually. This is inconvenient and time-consuming. Instead, it can set an initialization string on the command line:

AT + CDGCONT = 1, IP, internet.mts.ru + AT + CDGCONT = 2, IP, internet.beeline.ru.

Now the initialization string is the controlling process for the computer. If MTS Internet becomes faster than Beeline, then MTS connection is used - otherwise MTS changes to Beeline connection.

Recommended: