On Tue, 09 Jan 2018 22:58:01 +0100
Darius Blaszyk <dhkblas...@zeelandnet.nl> wrote:

> By accident I noticed the comp type for the first time. It's an Int64
> but is considered to be a real type. Just out of curiosity, what is the
> use case of such a type, or is this just implemented for compatibility
> reasons?

Comp is Int64 div 10000. So it is a real, but not a float.
This has some advantages computing things like money.
For example it can represent numbers like 0.3 exactly, which is
not possible with double.
Also computing integers is often faster than doubles.

Mattias
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to