Name

DoubleToComp Procedure

Syntax

procedure DoubleToComp(Value: Double; var result: Comp); cdecl;

Description

DoubleToComp converts a Double value to Comp. It is a real function.

Tips and Tricks

  • You can call DoubleToComp in a C++ Builder program. Delphi automatically converts Double to Comp when it needs to, so you don’t need to call this function in a Delphi program.

  • Double supports a wider range of values than Comp. Converting Double to Comp can result in runtime error 6 (EInvalidOp).

See Also

Comp Type, CompToDouble Function, Double Type

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.