Keyword


A keyword is a word in a programming language that has a fixed meaning for the compiler.

Some keywords are:

In many languages, it is not permitted to use keywords as identifiers. It is therefore spoken of "dirty words": ("WHILE is a dirty word, you have to choose another identifier.") COBOL has many keywords, the programmer of which does not know the meaning but which he must know he must avoid them as an identifier. However, other languages ​​are very flexible (such as PostScript) and allow keywords to be redefined for certain purposes. In some older languages ​​(including Fortran), the syntax is such that there is no misunderstanding between an identifier or keyword.

Languages ​​often differ in what is seen as a keyword and what is a routine provided by a library, for example, some languages ​​provide key words for input and output operations, while other languages ​​call for a library.

Many keywords are at the beginning of a statement and indicate what statement it is. For example, there is a FOR statement, an IF statement, etc. The assignment is an exception in most languages ​​- it starts with the identifier that is assigned a value. A subroutine is often called without a keyword.

wiki