Name
Comp Type
Syntax
type Comp;
Description
The Comp type is a 64-bit signed integer type that
uses the floating-point processor. The Comp type
exists only for backward compatibility. New programs should use
Int64 instead. The Int64 type
is a true integer type and allows bitwise and shift operations,
supports the full range of the 64-bit type, and is not dependent on
the floating-point control word.
Tips and Tricks
To use the full 64-bit precision of the
Comptype, the floating-point control word must be set to extended precision. Some Microsoft and other DLLs change the floating-point control word to double or single precision, thereby reducing theComptype to 53 or fewer bits.Delphi’s I/O and the formatting routines in the
SysUtilsunit do not support the full range of theComptype. Values near the limits of theComptype are printed with less precision than is actually stored in theCompvariable. Most applications will not encounter this limitation.
See Also
| CompToCurrency Function, CompToDouble Function, CurrencyToComp Procedure, DoubleToComp Procedure, Extended Type, Int64 Type |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access