property关键字的作用是什么?
property CommonPres:double read fCommonPres write fCommonPres;这句话是什么意思??其中的read,write的含义?

解决方案 »

  1.   

    就是当你用CommonPres时,实际读取和写入的是fCommonPres值
      

  2.   

    申明类属性。
    property CommonPres:double read fCommonPres write fCommonPres;属性CommonPres是double类型,对这个属性的值的操作是通过读取或赋值私有变量FCommonPres来获得的。
      

  3.   

    那property关键字的作用是什么?
      

  4.   

    property为定义属性,
    property CommonPres:double read fCommonPres write fCommonPres;--fCommonPres应该是private区域的一个变量,即私有变量。为了其他用户使用fCommonPres值,定义了CommonPres。read表示可通过?=CommonPres的形式读取fCommonPres,write表示可通过CommonPres=?的形式赋值给fCommonPres。