Share on Facebook Share on Twitter Email
Answers.com

Program state

 
Sci-Tech Dictionary: program state
 
(′prō·grəm ′stāt)

(computer science) The mode of operation of a computer during the execution of instructions in an application program.


Search unanswered questions...
Enter a word or phrase...
All Community Q&A Reference topics
Wikipedia: Program state
 

One of the key concepts in computer programming is the idea of state, essentially a snapshot of the measure of various conditions in the system. Most programming languages require a considerable amount of state information in order to operate properly - information which is generally hidden from the programmer. For a real-world example, consider a three-way light switch. An ordinary switch turns on a light when it's in the "up" position, but in a three-way switch the "up" position could be on or off, depending on the state or "configuration" of the other switch, which is likely out of view.

In fact, the state is often hidden from the computer's hardware as well, which normally has no idea that this piece of information determines program state, while that piece is a temporary variable and will soon be discarded. This is a serious problem, as the state information needs to be shared across multiple processors in parallel processing machines. Without knowing which state is important and which isn't, most languages force the programmer to add a considerable amount of extra code to indicate which data and parts of the code are important in this respect.

In computer science, imperative programming is opposed to declarative programming. Imperative programming is a programming paradigm that describes computation in terms of a program state and statements that change the program state.

References

See also


 
 

 

Copyrights:

Sci-Tech Dictionary. McGraw-Hill Dictionary of Scientific and Technical Terms. Copyright © 2003, 1994, 1989, 1984, 1978, 1976, 1974 by McGraw-Hill Companies, Inc. All rights reserved.  Read more
Wikipedia. This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Program state" Read more

 

Mentioned in