日一个对象被声明为某一类型,那么在 类型声明所界定的范围内可以对对象进行 运算(或操作) 例:bit类型对象,可以定其值为0°或 1’,但不能定其值为10(越界)
一旦一个对象被声明为某一类型,那么在 类型声明所界定的范围内可以对对象进行 运算(或操作)。 例:bit类型对象,可以定其值为‘0’ 或 ‘ 1’,但不能定其值为10 (越界)
类型声明的格式为: type declaration… TYPE identifier Is type definition *注意: identifier不能为预定义类型
类型声明的格式为: type declaration … TYPE identifier IS type_definition; * 注意:identifier不能为预定义类型
子类型声明的格式为: subtype declaration.. SUBTYPE identifier Is subtype indication 子类型并不是一个新类型,它是基类型的子集的一个新名字
子类型声明的格式为: subtype declaration … SUBTYPE identifier IS subtype_indication; 子类型并不是一个新类型,它是基类型的子集的一个新名字
Fi: TYPE control valves IS(on, ff, standby, shutdown) sUbtYpe off controls is control valveS range off to shutdown
例: TYPE control_valves IS (on ,off, standby, shutdown); SUBTYPE off_controls IS control_valves RANGE off TO shutdown;
数量类型 数量类型用相应的比例来说明。 包括:物理类型( physical types 浮点类型( floating types) 枚举类型( enumeration types) 整数类型( Integer types)
一、 数量类型 数量类型用相应的比例来说明。 包括: 物理类型 (physical types) 浮点类型 (floating types) 枚举类型 (enumeration types) 整数类型 (integer types)