首页 > 代码库 > state与status的区别

state与status的区别

status 指人时暗指相对的地位,指物时相当于 situation。situation 较狭义地指由环境综合决定的特定时间上的状态或情形。 

state 人或物存在或所处的状态,和 condition 大体上可以互换使用。condition 指一定的原因/条件或环境所产生的特定情况。

以 Recordset 为例

Recordset 具有 Status 和 State 属性,说明二者还是有区别的。

Recordset.Status 表示进行批处理后,当前记录的情况。结果有:操作被取消,结果未被保存;记录被锁无法保存……。

Recordset.State 表示 Recordset 对象是打开的,还是关闭的,还是正在执行异步操作。

再举例子

最近的国际形式如何?status。

水在标准大气压下 100 摄氏度时是什么状态?state。

http://stackoverflow.com/questions/1162816/naming-conventions-state-versus-status

It depends on the contextState generally refers to the entire state of an entity - all its values and relationships at a particular point in time (usually, current)Status is more of a time-point, say, where something is at in a process or workflow - is it dirty (therefore requiring saving), is it complete, is it pending input, etc

这取决于使用环境。 State一般囊括了一个实体的所有状态。 Status更像是一个时间点,比如在一个流程中,这个对象是dirty、complete或者pending input等等。

 

http://english.stackexchange.com/questions/12958/status-vs-state

 

Can anyone explain what the difference between status and state is when I talk about the condition or situation of an object?

Here‘s what I got from Longman English Dictionary.

status: a situation at a particular time, especially in an argument, discussion etc.

state: the physical or mental condition that someone or something is in

or example, how do you interpret these two sentences: 

What is the current status of this project? 

What is the current state of this project?

 

state与status的区别