Talk:Reserved word
![]() | This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||
|
Question: Equivalence of "Reserved words" and "Keywords"?
[edit](Original threadstarter did not title thread. --Netizen (talk) 15:24, 27 May 2009 (UTC))
In which languages the reserved words are the same as keywords?
Note: AKA "Magic words"
[edit](Original threadstarter did not title thread. --Netizen (talk) 15:24, 27 May 2009 (UTC))
Some times, depricated reserved are called as Magic words. - Narasimha Rao Konjeti
Note: Article edited as class assignment
[edit](Original threadstarter did not title thread. --Netizen (talk) 15:24, 27 May 2009 (UTC))
Hello all. As part of a university technical writing class assignment, our professor decided to have the class edit/create/revise a Wikipedia article. The content on this page as of 25 JAN 08, 23:00 EST, is our "contribution". I hope you find it satisfactory. I would have liked to include some references, but we didn't get that far. Any comments would be welcome. Thanks
Senseisk (talk) 05:31, 26 January 2008 (UTC) Wayne State University Detroit, MI, USA
Reserved words not highlighted as described
[edit]In the section "Comparison by language", the intro text says that the keywords in the examples are in blue, but in fact they aren't. The Java example has them in bold, while for COBOL the words IF
, THEN
, and ELSE
are in an ugly gold color. Actually, I see the wikicode specifies "fortran" as the language; "cobol" gives different highlighting, but still doesn't highlight all keywords. What should we do about this? Highlight it manually? It's a bad idea to rely on the automatic highlighting and then say it looks a certain way, since it can vary both over time and possibly by which skin a reader is using. ddawson (talk) 02:26, 17 December 2009 (UTC)
Java keywords
[edit]According to JLS §3.9, even goto and const are keywords. Only true, false and null are reserved words, but not keywords. MCEmperor (talk) 08:02, 14 September 2017 (UTC)
CRITIQUE of the first paragraph
[edit]Although this is a critique of the first paragraph, the entire article contains many errors and introduces too many concepts that deviate from its purpose. That being, what is a reserved word.
Current form of this article's first paragraph
[edit]In a computer language, a reserved word (also known as a reserved identifier) is a word that cannot be used as an identifier, such as the name of a variable, function, or label – it is "reserved from use". This is a syntactic definition, and a reserved word may have no meaning.
Criticisms
[edit]- In the first sentence, the phrase "also known as a reserved identifier," contradicts the phrase that immediately follows it, "is a word that cannot be used as an identifier."
- The second sentence, "This is a syntactic definition, and a reserved word may have no meaning," is incorrect and creates confusion. Within the context of computer languages, syntax means a set of rules and principles in a language according to which its tokens (such as identifiers, keywords, literals, operators, and punctuators) are arranged to create well-formed instructions. Therefore, the phrase "this is a syntactic definition," is incorrect because a reserved word is not a rule, nor a definition of syntax; it is just simply a noun that represents a type of programming language token. And the phrase "a reserved word may have no meaning," is also incorrect, since a reserved word (or keyword) is a token that has, and must have, special meaning to a language's compiler. In other words, since a reserved word (or keyword) has a special and concise meaning to a compiler, it can only be used for its intended purpose, and its purpose cannot change.