programming languages - What is the difference between a statement and a keyword? -


after calling return statement, brought out me in comments:

return isn't statement, it's keyword starts return statement.

what difference between a statement , a keyword starts statement?

what's difference between sentence , noun starts sentence? ;-)

return keyword, means it's 1 of few basic terms (tokens) of language. privileged, each reserved special purpose , having special meaning (compare run of mill identifiers/names).

a statement (in broad terms - specific differ between languages) higher-level unit of language, akin (a particular kind of) sentence in natural language. statements include return 1+1; , foo(bar);, not expressions 1+1 or foo(bar).

keywords form part of statements (e.g. return introduces return statement), never make full statement on own - return; still needs statement terminator.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -