Identifier 41250 200861488 2008-03-25T19:01:51Z 151.213.186.0 '''Identifiers''' ('''IDs''') are [[Lexical (semiotics)|lexical]] [[Token (parser)|token]]s that name [[entity|entities]]. The concept is [[analogy|analogous]] to that of a "[[name]]". Identifiers are used extensively in virtually all [[information processing system]]s. Naming entities makes it possible to refer to them, which is essential for any kind of symbolic processing. == Identifiers in computer languages == In [[computer language]]s, identifiers are [[Token (parser)|token]]s (also called [[symbol]]s) which name language entities. Some of the kinds of entities an identifier might denote include [[variable]]s, [[datatype|type]]s, [[label (programming language)|label]]s, [[subroutine]]s, and [[Software_package|package]]s. In most languages some character sequences have the lexical form of an identifier but are known as [[Keyword (computer programming)|keywords]]. In a few languages, eg, [[PL/1]], the distinction is not clear cut. Computer languages usually place restrictions on what characters may appear in an identifier. For example, in early versions the [[C (programming language)|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). In [[compiled]] programming languages, identifiers are generally [[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). In [[interpreted language]]s identifiers are often present at runtime, sometimes even as [[first-class object]]s which can be freely manipulated and evaluated. In [[Lisp (programming language)|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: * in [[Perl]] a variable is indicated using a prefix called a [[sigil (computer programming)|sigil]], which specifies aspects of how the variable is interpreted in [[Expression (programming)|expressions]]. * in [[Ruby programming language|Ruby]] a variable is automatically considered [[Immutable object|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. == See also == {{Wiktionarypar|identifier}} * [[Naming conventions (programming)]] * [[Name binding]] * [[Method overloading|Overloading]] * [[Unique identifier]] [[Category:Identifiers|*]] [[de:Identifikator]] [[es:Identificador]] [[fr:Identificateur]] [[ko:식별자]] [[it:Identificatore]] [[ja:識別子]] [[pl:Identyfikator (programowanie)]] [[ru:Идентификатор]] [[ta:இனங்காட்டி (கணினியியல்)]]