Identifier

From Wikipedia, the free encyclopedia

(Redirected from Identifiers)
Jump to: navigation, search

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, identifiers are textual 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, 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 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 languages identifiers are often present at runtime, sometimes even as first-class objects which 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:

  • 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.

Look up identifier in Wiktionary, the free dictionary.
Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.