Declarations Encyclopedia Article

Declarations

The following sections of this BookRags Literature Study Guide is offprint from Gale's For Students Series: Presenting Analysis, Context, and Criticism on Commonly Studied Works: Introduction, Author Biography, Plot Summary, Characters, Themes, Style, Historical Context, Critical Overview, Criticism and Critical Essays, Media Adaptations, Topics for Further Study, Compare & Contrast, What Do I Read Next?, For Further Study, and Sources.

(c)1998-2002; (c)2002 by Gale. Gale is an imprint of The Gale Group, Inc., a division of Thomson Learning, Inc. Gale and Design and Thomson Learning are trademarks used herein under license.

The following sections, if they exist, are offprint from Beacham's Encyclopedia of Popular Fiction: "Social Concerns", "Thematic Overview", "Techniques", "Literary Precedents", "Key Questions", "Related Titles", "Adaptations", "Related Web Sites". (c)1994-2005, by Walton Beacham.

The following sections, if they exist, are offprint from Beacham's Guide to Literature for Young Adults: "About the Author", "Overview", "Setting", "Literary Qualities", "Social Sensitivity", "Topics for Discussion", "Ideas for Reports and Papers". (c)1994-2005, by Walton Beacham.

All other sections in this Literature Study Guide are owned and copyrighted by BookRags, Inc.

Declarations

Declarations are used in computer programming to introduce a new variable, or other new information for use. A variable is a symbol or a name that denotes a numerical value or characters. Typically declaration can be achieved using a declarative statement. The structure of the declarative statement varies from program to program. The intent of the statement, however, is the same across the various programming languages.

Declaration serves to tell the computer's compiler—a program that translates the source code into a code that will be used for the execution of actions--generalized aspects of the piece of information, such as an identifying name, type, and the amount of memory that needs to be allocated. The compiler is thus able to allocate enough memory to hold a value of that particular data type and to associate an identifier with the location.

Data that is created must be declared before it can be used. Declaration can be made at the time the data is used. Thus, declarations are an essential part of programming languages. The language used to declare variables differs in different operating programs. For example, in the C programming language, the declaration "int" is used to express integers and the declaration "float" is used to express real numbers. In both Java and Pascal, each variable declaration is denoted by the code "var."