Keyword (computer programming): Difference between revisions

Content deleted Content added
SmackBot (talk | contribs)
m Date maintenance tags and general fixes: build 424:
Line 1:
{{Unreferenced stub|auto=yes|date=December 2009}}
In [[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 many languages, such as [[C (programming language)|C]] and similar environments like [[C++]], a ''keyword'' is a [[reserved word]] which identifies a syntactic form. Words used in [[control flow]] constructs, such as <tt>if</tt>, <code>then</code>, and <code>else</code> are keywords. In these languages, keywords cannot also be used as the names of variables or functions.
 
Some languages, such as [[PostScript]], are extremely liberal in this approach, allowing core keywords to be redefined for specific purposes.
 
In [[Common Lisp]], the term "keyword" (or "keyword symbol") is used for a special sort of [[symbol (Lisp)|symbol]], or identifier. Unlike other symbols, which usually stand for variables or functions, keywords are self-[[Lisp (programming language)#Self-evaluating forms and quoting|quoting]] and evaluate to themselves. Keywords are usually used to label named arguments to functions, and to represent symbolic values.
Line 16:
==See also==
* [[Java keywords]]
* [http://onlinetps.com/keywords.htm Sample Keywords list ]{{failedFailed verification|date=July 2010}}
 
{{DEFAULTSORT:Keyword (Computer Programming)}}