keyword is a word with a special meaning in a specific context. This is a semantic definition.
a reserved word is a word that cannot be used as an identifier - such as a variable name and a function name. This is a syntax definition.
For example, in Java, all keywords are reserved words. Probably not the other way around. goto is a reserved word, but is not used and has no function.
Older languages, such as FORTRAN, had keywords, but not reserved words.
However, the keyword and the reserved word are used interchangeably.
Yergalem Jun 05 '17 at 18:59 on 2017-06-05 18:59
source share