Program State
Similarly, a computer program stores data in variables, which represent storage locations in the computer's memory. The contents of these memory locations, at any given point in the program's execution, is called the program's state.
Imperative programming is a programming paradigm (way of designing a programming language) that describes computation in terms of the program state and statements that change the program state. In contrast, in declarative programming languages the program describes the desired results, and doesn't specify changes to the state directly.
A more specialized definition of state is used in some computer programs that operate serially (sequentially) on streams of data, such as parsers, firewalls, communication protocols and encryption programs. In some of these programs, the history of previous data inputs affects the processing of current input, that is the program can be modeled as a state machine. These programs are described as "stateful", and variables which contain values from the previous processing cycle are called the state. In other serial programs the output only depends on the current input; these are called "stateless".
Read more about this topic: State (computer Science)
Famous quotes containing the words program and/or state:
“Instead of offering the Indians a chance to surrender, and to be taken peaceably, General Connor issued a very cruel order to his menTake no prisoners, fight to the death; nits breed lice.”
—State of Utah, U.S. public relief program (1935-1943)
“Oh, the holiness of always being the injured party. The historically oppressed can find not only sanctity but safety in the state of victimization. When access to a better life has been denied often enough, and successfully enough, one can use the rejection as an excuse to cease all efforts. After all, one reckons, they dont want me, they accept their own mediocrity and refuse my best, they dont deserve me.”
—Maya Angelou (b. 1928)