|It has been suggested that Identifier (metadata) be merged into this article or section. (Discuss)|
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.
Identifiers 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 the C and C++ language, 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.
- In Perl a variable is indicated using a prefix called a sigil, which specifies aspects of how the variable is interpreted in expressions.
- In Ruby a variable is automatically considered immutable if its identifier starts with a capital letter.
- In Fortran, the first letter in a variable's name indicates whether by default it is created as an integer or floating point variable.
Advantages of the application
Since 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:
- One person with multiple names
- One document with multiple versions
- CAS index names versus IUPAC names
Identifiers in various disciplines
- Australian Business Number
- CAS registry number
- Digital object identifier
- E number
- EC number
- Global Trade Item Number
- International Chemical Identifier
- International Standard Book Number
- International Standard Serial Number
- Library of Congress Control Number
- Personal identification number (Denmark)
- Serial Item and Contribution Identifier
- Tax File Number
- ↑ University of Glasgow. "Procedure for Applying Identifiers to Documents". http://www.gla.ac.uk/infostrat/ERM/Docs/procref.htm. Retrieved 28 April 2009.
- ↑ Advanced Chemistry Development. "IUPAC vs. CAS Index". http://www.acdlabs.com/products/name_lab/iupac_cas.html. Retrieved 28 April 2009.
- ↑ University of Pennsylvania. "Information on Chemical Nomenclature". http://gethelp.library.upenn.edu/guides/scitech/chemnom.html. Retrieved 28 April 2009.