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:
“Most of the folktales dealing with the Indians are lurid and romantic. The story of the Indian lovers who were refused permission to wed and committed suicide is common to many places. Local residents point out cliffs where Indian maidens leaped to their death until it would seem that the first duty of all Indian girls was to jump off cliffs.”
—For the State of Iowa, U.S. public relief program (1935-1943)
“If a thousand men were not to pay their tax-bills this year, that would not be a violent and bloody measure, as it would be to pay them, and enable the State to commit violence and shed innocent blood. This is, in fact, the definition of a peaceable revolution, if any such is possible.”
—Henry David Thoreau (18171862)