Extended data types (EDTs) are user-defined types, based on the primitive
data types boolean, integer,
real, string, and date, and the composite type container.
You can also base EDTs on other EDTs.
Benfits:
1. Code is easier to read because variables have a meaningful data type. For example, Name instead of string.
2. The properties you set for an EDT are used by all instances of that type, which reduces work and promotes consistency.
Ex: account numbers (AccountNum data type) have the same properties throughout the system.
3. You can create hierarchies of EDTs, inheriting the properties that are appropriate from the parent and changing the other properties.
Ex: the ItemCode data type is used as the basis for the MarkupItemCode and PriceDiscItemCode data types.
Declartion of EDT variables:
// A UserGroupID (integer) variable is declared and initialized to 1.
UserGroupID groupID = 1;
// An Amount (real) variable is declared.
Amount currency;
You can also base EDTs on other EDTs.
Benfits:
1. Code is easier to read because variables have a meaningful data type. For example, Name instead of string.
2. The properties you set for an EDT are used by all instances of that type, which reduces work and promotes consistency.
Ex: account numbers (AccountNum data type) have the same properties throughout the system.
3. You can create hierarchies of EDTs, inheriting the properties that are appropriate from the parent and changing the other properties.
Ex: the ItemCode data type is used as the basis for the MarkupItemCode and PriceDiscItemCode data types.
Declartion of EDT variables:
// A UserGroupID (integer) variable is declared and initialized to 1.
UserGroupID groupID = 1;
// An Amount (real) variable is declared.
Amount currency;
No comments:
Post a Comment