语句和关键字有什么区别? [英] What is the difference between a statement and a keyword?
问题描述
调用return
声明后,它在评论中带给我:
After calling return
a statement, it was brought out to me in the comments:
return
不是语句,而是启动return语句的关键字.
return
isn't a statement, it's the keyword that starts the return statement.
一条语句和开始一条语句的关键字有什么区别?
推荐答案
句子和以句子开头的名词有什么区别? ;-)
What's the difference between a sentence and a noun that starts a sentence? ;-)
return
是关键字,表示它是该语言的一些基本术语(标记)之一.它们具有特权,每种特权都保留有特殊目的并具有特殊含义(将其与运行工厂的标识符/名称进行比较).
return
is a keyword, which means it's one of a few basic terms (tokens) of the language. They are privileged, each reserved for a special purpose and having special meaning (compare this with run of the mill identifiers/names).
(从广义上来说-语言之间的特定差异)语句是语言的高级单元,类似于自然语言中的(某种特定类型的)句子.语句包括return 1+1;
和foo(bar);
,但通常不包括1+1
或foo(bar)
之类的表达式.
A statement is (in broad terms - specific differ between languages) a higher-level unit of the language, akin to (a particular kind of) sentence in natural language. Statements include return 1+1;
and foo(bar);
, but generally not expressions like 1+1
or foo(bar)
.
关键字通常构成语句的一部分(例如,return
引入了return语句),但是它们从来没有自己做出完整的语句-甚至return;
仍然需要语句终止符.
Keywords often form part of statements (e.g. return
introduces a return statement), but they never make a full statement on their own - even return;
still needs a statement terminator.
这篇关于语句和关键字有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!