Reserved word

In a programming language, a reserved word (sometimes known as a reserved identifier) is a word that cannot be used by a programmer as an identifier, such as the name of a variable, function, or label – it is "reserved from use". In brief, an identifier starts with a letter, which is followed by any sequence of letters and digits (in some languages underline '_' is treated as a letter!).

In an imperative programming language and in many object-oriented programming languages, apart from assignments and subroutine calls, keywords are often used to identify a particular statement, e.g. if, while, do, for, etc. Many languages treat keywords as reserved words, including Ada, C, C++, COBOL, Java, and Pascal. The number of reserved words varies widely from one language to another: C has about 30 while COBOL has about 400.

Note that a few languages do not have any reserved words. Fortran and PL/I identify keywords by context, while Algol 60 and Algol 68 generally use stropping to distinguish keywords from programmer-defined identifiers.

Most programming languages have a standard library (or libraries), e.g. mathematical functions sin, cos, etc. The names provided by a library are not reserved, and can be redefined by a programmer if the library functionality is not required.


Reserved word

Dodaje.pl - Ogłoszenia lokalne