home *** CD-ROM | disk | FTP | other *** search
- The functions real() and trunc() convert the value of a Fraction
- object to a number of type double or integer. These functions are
- declared to be friends so that they can be used, much like the
- built-in type conversions, in function notation. The function
- names real() and trunc() are used rather than the standard
- conversions float() and int() to avoid any ambiguities in
- arithmetic expressions. For example, if "a" is a Fraction object,
- the expression "a + 2" cannot be interpreted as "int + int".
-