An
identifier is a unique expression in a written format either by a
codeA code is a rule for converting a piece of information into another object or action, not necessarily of the same sort.Code may also refer to:in science*Code , device for hiding the meaning of a message...
, 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
identificationIdentification or Identify may refer to:* Body identification* Combat Identification* Eyewitness identification* Forensic identification* Gender identity* Hazard Identification...
s of objects, identifiers could be more complicated.
In
computer scienceComputer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems. It is frequently described as the systematic study of algorithmic processes that create, describe and transform...
,
Identifiers (
IDs) are
lexicalIn the lexicon of a language, lexical words or nouns refer to things. These words fall into three main classes:*proper nouns refer exclusively to the place, object or person named, i.e...
tokens that name
entitiesAn entity is something that has a distinct, separate existence, though it need not be a material existence. In particular, abstractions and legal fictions are usually regarded as entities. In general, there is also no presumption that an entity is animate...
. The concept is
analogousAnalogy is a cognitive process of transferring information from a particular subject to another particular subject , and a linguistic expression corresponding to such a process...
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
symbolA symbol is something such as an object, picture, written word, sound, or particular mark that represents something else by association, resemblance, or convention. For example, a red octagon may stand for "STOP". On maps, crossed sabres may indicate a battlefield...
s) which name language entities. Some of the kinds of entities an identifier might denote include
variableIn computer programming, a variable is a facility for storing data. The current value of the variable is the data actually stored in the variable. Depending on the programming language in question, the data stored in the variable can be intentionally altered during the program run. This is why it...
s, types,
labelA label in a programming language is a sequence of characters that identifies a location within source code. In most languages labels take the form of an identifier, often followed by a punctuation character . In many high level programming languages the purpose of a label is to act as the...
s,
subroutineIn computer science, a subroutine or subprogram is a portion of code within a larger program, which performs a specific task and is relatively independent of the remaining code....
s, and
packageA software package is used in object-oriented programming to name a group of related classes of a program. Packages are useful to measure and control the inherent coupling of a program....
s.
In most languages, some character sequences have the lexical form of an identifier but are known as
keywordsIn computer programming, a keyword is a word or identifier that has a particular meaning to the programming language. The meaning of keywords — and, indeed, the meaning of the notion of keyword — differs widely from language to language....
. 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
CC is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
and
C++C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features...
languages, identifiers are restricted to being a sequence of one or more
ASCIIThe American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...
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
UnicodeUnicode is a computing industry standard allowing computers to consistently represent and manipulate text expressed in most of the world's writing systems...
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
compilerA compiler is a computer program that transforms source code written in a computer language into another computer language...
, identifiers are often only
compile timeIn computer science, compile time refers to either the operations performed by a compiler , programming language requirements that must be met by source code for it to be successfully compiled , or properties of the program that can be reasoned about at compile time.The operations performed at...
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 objectIn computing, a first-class object , in the context of a particular programming language, is an entity which can be passed as a parameter, returned from a subroutine, or assigned into a variable...
s that can be freely manipulated and evaluated. In Lisp, these are called
symbolsA symbol in the programming language Lisp is a primitive data structure that has a name. Symbols can be used as identifiers. Symbols are unique in a namespace . Symbols can be tested for equality with the function EQ. Lisp programs can generate new symbols at runtime. When Lisp reads data that...
.
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:
- In Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall, a linguist working as a systems administrator for NASA, in 1987, as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone...
a variable is indicated using a prefix called a sigilIn computer programming, a sigil is a symbol attached to a variable name, showing the variable's datatype or scope. The term was first used by Philip Gwyn in 1999 "to mean the funny character at the front of a Perl variable"...
, which specifies aspects of how the variable is interpreted in expressionsAn expression in a programming language is a combination of values, variables, operators, and functions that are interpreted according to the particular rules of precedence and of association for a particular programming language, which computes and then produces another value...
.
- In Ruby a variable is automatically considered immutable
In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created...
if its identifier starts with a capital letter.
- In Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...
, the first letter in a variable's name indicates whether by default it is created as an integerThe integers are natural numbers including 0 and their negatives . They are numbers that can be written without a fractional or decimal component, and fall within the set {.....
or floating pointIn computing, floating point describes a system for numerical representation in which a string of digits represents a rational number....
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
Chemical Abstracts Service is a division of the American Chemical Society, and produces Chemical Abstracts, and related products...
index names versus IUPAC names
Identifiers in various disciplines
- Australian Business Number
An Australian Business Number, or ABN, is a unique identifier issued by the Australian Taxation Office that is used by business entities when dealing with the Australian government...
- CAS registry number
CAS registry numbers are unique numerical identifiers for chemical elements, compounds, polymers, biological sequences, mixtures and alloys. They are also referred to as CAS numbers, CAS RNs or CAS #s....
- CODEN
CODEN – according to ASTM standard E250 – is a six character, alphanumeric bibliographic code, that provides concise, unique and unambiguous identification of the titles of serials and non-serial publications from all subject areas....
- Digital object identifier
The Digital Object Identifier System is a managed system for persistent identification of content-related entities on digital networks. These entities may be content items , or any related entities in a content transaction...
- E number
E numbers are number codes for food additives and are usually found on food labels throughout the European Union. The numbering scheme follows that of the International Numbering System as determined by the Codex Alimentarius committee. Only a subset of the INS additives are approved for use in...
- EC number
The Enzyme Commission number is a numerical classification scheme for enzymes, based on the chemical reactions they catalyze....
- Global Trade Item Number
Global Trade Item Number is an identifier for trade items developed by GS1...
- International Chemical Identifier
The IUPAC International Chemical Identifier is a textual identifier for chemical substances, designed to provide a standard and human-readable way to encode molecular information and to facilitate the search for such information in databases and on the web...
- International Standard Book Number
The International Standard Book Number is a unique numeric commercial book identifier based upon the 9-digit Standard Book Numbering code created by Gordon Foster, now Emeritus Professor of Statistics at Trinity College, Dublin, for the booksellers and stationers W.H...
- International Standard Serial Number
An International Standard Serial Number is a unique eight-digit number used to identify a print or electronic periodical publication. The ISSN system was adopted as international standard ISO 3297 in 1975...
- Library of Congress Control Number
The Library of Congress Control Number or LCCN is a serially based system of numbering cataloging records in the Library of Congress in the United States...
- Personal identification number (Denmark)
The Danish Personal Identification number is a national identification number, which is part of the personal information stored in the Civil Registration System ....
- Serial Item and Contribution Identifier
The Serial Item and Contribution Identifier is a code used to uniquely identify specific volumes, articles or other identifiable parts of a periodical...
- Tax File Number
Tax File Number is an 8 or 9 digit number issued by the Australian Taxation Office to each taxpayer to identify that taxpayer's Australian tax dealings. When it was introduced in 1988, individuals received a 9 digit TFN and non-individuals were issued an 8 digit TFN. Now both are issued 9...
See also
- Barcode
A barcode is an optical machine-readable representation of data. Originally, barcodes represented data in the widths and the spacings of parallel lines, and may be referred to as linear or 1D barcodes or symbologies...
- Binomial nomenclature
The formal system of naming species is called binominal nomenclature , binary nomenclature , or the binomial classification system...
- British Approved Name
A British Approved Name is the official non-proprietary or generic name given to a pharmaceutical substance, as defined in the British Pharmacopoeia...
- Diagnosis codes
In medicine, Diagnostic codes are used to group and identify diseases, disorders, symptoms, and medical signs, and are used to measure morbidity and mortality....
- Document management system
A document management system is a computer system used to track and store electronic documents and/or images of paper documents. The term has some overlap with the concepts of content management systems...
- Gene nomenclature
Gene nomenclature is the scientific naming of genes, the units of heredity in living organisms. An international committee published recommendations for genetic symbols and nomenclature in 1957. The need to develop formal guidelines for human gene names and symbols was recognized in the 1960s and...
- Identifier (metadata)
In metadata, an identifier is a language-independent label, sign or token that uniquely identifies an object within an identification scheme.The suffix identifier is also used as a representation term when naming a data element....
- Identification
Identification or Identify may refer to:* Body identification* Combat Identification* Eyewitness identification* Forensic identification* Gender identity* Hazard Identification...
- Identity document
An identity document is any document which may be used to verify aspects of a person's personal identity. If issued in the form of a small, mostly standard-sized card, it is usually called an identity card...
- Nomenclature
Nomenclature refers to either a list of names and/or terms, or to the system of principles, procedures and terms related to naming - which is the assigning of a word or phrase to a particular object or property...
– contains various standardized naming systems
- Nomenclature Codes
The Nomenclature Codes are the various rulebooks that govern biological nomenclature, each in their own area...
- International Code of Botanical Nomenclature
The International Code of Botanical Nomenclature is the set of rules and recommendations dealing with the formal botanical names that are given to plants. Its intent is that each taxonomic group of plants has only one correct name that is accepted worldwide...
- International Code of Nomenclature of Bacteria
The International Code of Nomenclature of Bacteria or Bacteriological Code governs the scientific names for bacteria, including Archaea. It denotes the rules for naming taxa of bacteria, according to their relative rank...
- International Code of Nomenclature for Cultivated Plants
The International Code of Nomenclature for Cultivated Plants regulates the naming of cultivars, cultivar Groups and graft-chimaeras...
- International Code of Zoological Nomenclature
The International Code of Zoological Nomenclature is both a book containing a set of rules and recommendations on the formal naming of animals, and that set itself. Among zoologists it is often referred to simply as "the Code"...
- IUPAC nomenclature
IUPAC nomenclature is a system of naming chemical compounds and of describing the science of chemistry in general. It is developed and kept up to date under the auspices of the International Union of Pure and Applied Chemistry ....
- Marketing part number
The Marketing Part Number is code that Apple Computer uses to classify all of its items in a unique way . A typical Marketing Part Number are M8738LL/A for an 20 GB iPod or M9454LL/A for a Power Macintosh G5. Hardware usually follows the M####LL/A format.- See also :* Identifier* Product code...
- Overloading
Method overloading is a feature found in various programming languages such as Ada, C#, C++, D and Java that allows the creation of several methods with the same name which differ from each other in terms of the type of the input and the type of the output of the function.For example, doTask and...
- Naming conventions (programming)
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types and functions etc...
- Name binding
In programming languages, name binding is the association of values with identifiers. An identifier bound to a value is said to reference that value. Since computers themselves have no notion of identifiers, there is no binding at the machine language level — name binding is an abstraction...
- National identification number
A national identification number or National Identity Card number is used by the governments of many countries as a means of tracking their citizens, permanent residents, and temporary residents for the purposes of work, taxation, government benefits, health care, and other governmentally-related...
- Part number
A part number is a unique identifier of a part used in a particular industry. Its purpose is to simplify referencing to that part. A part number unambiguously defines a part within a single manufacturer....
- Product code
Product code is a unique identifier, assigned to each finished/manufactured product which is ready, to be marketed or for sale.It could mean:* Universal Product Code, common bar code used to identify products* Electronic Product Code...
- Systematized Nomenclature of Medicine
The Systematized Nomenclature of Medicine is a multiaxial, hierarchical classification system . As in any such system, a disease may be located in a body organ which results in a code in a topography axis and may lead to morphological alterations represented by a morphology code.-Purpose:SNOMED...
- Uniform Resource Identifier
In computing, a Uniform Resource Identifier consists of a string of characters used to identify or name a resource on the Internet. Such identification enables interaction with representations of the resource over a network using specific protocols...
- Unique identifier
With reference to a given set of objects, a unique identifier is any identifier which is guaranteed to be unique among all identifiers used for those objects and for a specific purpose...