Technical Notes Database
TN643D.txt COMP TYPE USES
Category :Pascal
Platform :All
Product :Turbo Pascal 4.0+
Description:
Q. What type is Comp? What is it useful for?
A. The Comp type is a cross between an integer and a real
type and is available when 8087 code is generated {$N+}. If no
math coprocessor is available, specify {$N+,E+} and the
emulator will support the Comp type. The compiler treats it as
a real type without an exponent. Thus Comp is useful when you
need to store extremely large numbers but don't need a decimal
point. For example, you might use variables of type Comp to
store amounts in cents and divide the value of the variable by
100 to determine what the value in dollars and cents would be.
Reference:
7/16/98 4:35:34 PM
Last Modified: 01-SEP-99