« [ Back to Home ] »
<< Return to Computer Dictionary Home
 

Send this page to a friend

.

 

Computer Dictionary Online

Search Computer Term Definition

Web Bestonlinedictionary.com

[ Law Dictionary ] [ Financial Dictionary ] [ Medical Dictionary ] [ Computer Dictionary ]

Computer Dictionary

A to Z Computer Terms Dictionary, Definitions Search

| 0-9 | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q |
|
R | S | T | U | V | W | X | Y | Z |
 

variable definition

<programming> (Sometimes "var" /veir/ or /var/) A named memory location in which a program can store intermediate results and from which it can read it them. Each programming language has different rules about how variables can be named, typed, and used. Typically, a value is "assigned" to a variable in an assignment statement. The value is obtained by evaluating an expression and then stored in the variable. For example, the assignment

	x = y + 1

means "add one to y and store the result in x". This may look like a mathematical equation but the mathematical equality is only true in the program until the value of x or y changes. Furthermore, statements like

	x = x + 1

are common. This means "add one to x", which only makes sense as a state changing operation, not as a mathematical equality.

The simplest form of variable corresponds to a single-word of memory or a CPU register and an assignment to a load or store machine code operation.

A variable is usually defined to have a type, which never changes, and which defines the set of values the variable can hold. A type may specify a single ("atomic") value or a collection ("aggregate") of values of the same or different types. A common aggregate type is the array - a set of values, one of which can be selected by supplying a numerical index.

Languages may be untyped, weakly typed, strongly typed, or some combination. Object-oriented programming languages extend this to object types or classes.

A variable's scope is the region of the program source within which it represents a certain thing. Scoping rules are also highly language dependent but most serious languages support both local variables and global variables. Subroutine and function formal arguments are special variables which are set automatically by the language runtime on entry to the subroutine.

In a functional programming language, a variable's value never changes and change of state is handled as recursion over lists of values.

(2004-11-16)

 


Nearby terms: vapourware « VAR « var « variable » Variational Graphics eXtended » VAX » VAX DOCUMENT
 
 
 
<< Return to Computer Dictionary Home Page
 


 

computer dictionary, computer terms dictionary, online computer dictionary, computer definition dictionary online, microsoft computer dictionary fifth edition, computer lingo dictionary, computer terminology dictionary, computer computer dictionary dictionary internet internet terms terms, barrons business computer dictionary dictionary internet terms, abbreviation computer dictionary lingo, computer dictionary edition new tenth websters world, computer dictionary with terms and definition, computer science dictionary, american computer dictionary house language random sign websters, dictionary computer internet terms, microsoft computer dictionary, computing dictionary

[ Home ] [ Law Dictionary ] [ Financial Dictionary ] [ Medical Dictionary ] [ Computer Dictionary ]
 

Hot Links : Electronic Tutorials , Information Encyclopedia Directory , Science Projects , Indian Food Recipes , Hot Game Cheater , Love & Romance Attachments , Krrish Game for PC

 

Best Online Dictionary .com

 

www.bestonlinedictionary.com Copyright ® 2006, All Rights Reserved