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:
“To motorists bound to or from the Jersey shore, Perth Amboy consists of five traffic lights that sometimes tie up week-end traffic for miles. While cars creep along or come to a prolonged halt, drivers lean out to discuss with each other this red menace to freedom of the road.”
—For the State of New Jersey, U.S. public relief program (1935-1943)
“Chippenhook was the home of Judge Theophilus Harrington, known for his trenchant reply to an irate slave-owner in a runaway slave case. Judge Harrington declared that the owners claim to the slave was defective. The owner indignantly demanded to know what was lacking in his legally sound claim. The Judge exploded, A bill of sale, sir, from God Almighty!”
—For the State of Vermont, U.S. public relief program (1935-1943)