Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

9.2. Definitional rules > 9.2.7. Standard format definitions - Pg. 277

256 CHAPTER 9 Rule statement templates and subtemplates Rule statements for this type of rule can be generated from the following template: T17. < literal 1> is by definition {approximately | } equal to < literal 2>. This template has the following options and placeholders: 1. < literal 1> is a standard quantity (usually 1) together with one of the units of measurement; 2. `approximately' is used if and only if the conversion is approximate; 3. < literal 2> is the corresponding quantity for the other unit of measurement, together with that unit of measurement. This type of rule statement requires no fact types. 9.2.7 Standard format definitions A standard format definition defines the standard format for data items of a particular type in terms of individual characters and/or component data items: for example, R339. A valid airline code is by definition composed of exactly two letters. Rule statements for this type of rule can be generated from the following template: T18. A valid < term> is by definition composed of < format definition>. This template has the following placeholders: 1. < term> is the term used for the type of data item; 2. the < format definition> placeholder can be replaced by anything defined in the following subtemplate: S19. < format definition>::¼ {{exactly | at least | up to} < positive integer 1> | from < positive integer 2> to < positive integer 3>} < term> {followed by < format definition> | } Thus any of the following can be substituted in place of the < format definition> placeholder: 1. `exactly', `at least', or `up to', followed by a positive integer and a term: for example, `exactly two digits', `at least three letters', `up to nine digits'; 2. `from', a positive integer, `to', and another positive integer followed by a term: for example, `from two to seven digits'; 3. any number of any of the above, each separated from the next by `followed by'. This type of rule statement requires no fact types.