Difference between revisions of "Keyword"
esse quam videri
Kspriggs01 (talk | contribs) (→Examples) |
Kspriggs01 (talk | contribs) (→Examples) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Definition= | =Definition= | ||
− | A keyword is a reserved word that has an inherent meaning to the compiler and thus cannot be used as an identifier within the language. Keywords often represent a language's possible reference values and statements. They are always written in lowercase, so in case-sensitive languages such as C versions of the same word that are not all lowercase can be used as identifiers. | + | A keyword is a '''reserved word''' that has an inherent meaning to the compiler and thus cannot be used as an identifier within the language. Keywords often represent a language's possible '''reference values''' and '''statements'''. They are always written in '''lowercase''', so in case-sensitive languages such as C versions of the same word that are not all lowercase can be used as identifiers. |
=Examples= | =Examples= | ||
Line 19: | Line 19: | ||
'''Statements:''' | '''Statements:''' | ||
− | |||
− | |||
- if / else | - if / else | ||
Line 26: | Line 24: | ||
- for / foreach | - for / foreach | ||
− | - switch / case / default | + | - switch / case / default / break |
- do / while | - do / while | ||
Line 34: | Line 32: | ||
=Resources= | =Resources= | ||
== See also == | == See also == | ||
− | + | - [[Statement]] | |
− | |||
− | |||
− | |||
==External Links== | ==External Links== |
Latest revision as of 22:27, 9 April 2020
Definition
A keyword is a reserved word that has an inherent meaning to the compiler and thus cannot be used as an identifier within the language. Keywords often represent a language's possible reference values and statements. They are always written in lowercase, so in case-sensitive languages such as C versions of the same word that are not all lowercase can be used as identifiers.
Examples
Reference Values:
- double
- int
- char
- string
- enum
- void
Statements:
- if / else
- for / foreach
- switch / case / default / break
- do / while
- return