What is the difference between “keyword” and “reserved word”?

前端 未结 10 2432
再見小時候
再見小時候 2020-12-13 05:54

What\'s the difference between a keyword and a reserved word?

For example, in the proposal for concepts in C++ one can read the following statement

10条回答
  •  有刺的猬
    2020-12-13 06:38

    Really it will depend a lot on context. For example, the ISO C++ Standard says that things like "if", "while", "int" etc. are keywords, and doesn't actually use the term reserved word, except once, in a footnote, where something else was probably meant :-)

    The standard doe specify reserved names - for example, all names that begin with an underscore and an uppercase letter are reserved names.

提交回复
热议问题