2011-05-29

Identifier (computer science)

Identifier

An identifier is a unique expression in a written format either by a code, by numbers or by the combination of both to distinguish variations from one to another among a class of substances, items, or objects. For living organisms and the structural identifications of objects, identifiers could be more complicated.

In computer science, Identifiers (IDs) are lexical tokens that name entities. The concept is analogous to that of a "name." Identifiers are used extensively in virtually all information processing systems. Naming entities makes it possible to refer to them, which is essential for any kind of symbolic processing.

In computer languages

In computer languages, identifiers are tokens (also called symbols) which name language entities. Some of the kinds of entities an identifier might denote include variables, types, labels, subroutines, and packages.

In most languages, some character sequences have the lexical form of an identifier but are known as keywords. In a few languages, e.g., PL/1, the distinction is not clear.

Computer languages usually place restrictions on what characters may appear in an identifier. For example, in early versions of the C and C++ languages, identifiers are restricted to being a sequence of one or more ASCII letters, digits (these may not appear as the first character), and underscores. Later versions of these languages, along with many other modern languages support almost all Unicode characters in an identifier (a common restriction is not to permit white space characters and language operators).

Implementations of programming languages that are using a compiler, identifiers are often only compile time entities. That is, at runtime the compiled program contains references to memory addresses and offsets rather than the textual identifier tokens (these memory addresses, or offsets, having been assigned by the compiler to each identifier).

Implementations of programming languages that offer interactive evaluation of source code (using an interpreter or an incremental compiler) present identifiers at runtime, sometimes even as first-class objects that can be freely manipulated and evaluated. In Lisp, these are called symbols.

Compilers and interpreters do not usually assign any semantic meaning to an identifier based on the actual character sequence used. However, there are exceptions.

For example:

Advantages of the application

Due to the uniqueness of an identifier, the confusions about the various descriptions on one substance, one item, one topic, or one object can be cleared.

Typical examples are:

Identifiers in various disciplines

Notes

See also






Retrieved from : http://en.wikipedia.org/wiki/Identifier#Identifiers_in_computer_languages