zoukankan      html  css  js  c++  java
  • 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 context
    
    State 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?

  • 相关阅读:
    缠中说禅 摘选
    laravel中不使用 remember_token时退出报错,如何解决?
    关于Ubuntu拒绝root用户ssh远程登录
    laravel中类似于thinkPHP中trace功能
    js原生语法实现表格操作
    使用clear来清除localStorage保存对象的全部数据
    JS设置CSS样式的集中方式
    thinkphp两表联查并且分页
    生于忧患,死于安乐 (先秦:孟子及其弟子)
    在对年轻人最不友好的环境中,刘裕起于阡陌,成就霸业
  • 原文地址:https://www.cnblogs.com/shangdawei/p/3981767.html
Copyright © 2011-2022 走看看