Re: [fpc-pascal] Comp type

2018-01-11 Thread greim
By the way there was a bug in fpc 3.0. I am not sure if it is fixed yet. Dividing a comp number by any other number gives wrong results. Please see my posting from 29.06.2016 Markus ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://list

Re: [fpc-pascal] Comp type

2018-01-10 Thread Tony Whyman
Thanks for the history. Comp has always puzzled me before, especially with these two functions from the RTL function MSecsToTimeStamp(MSecs: Comp): TTimeStamp; function TimeStampToMSecs(const TimeStamp: TTimeStamp): comp; I assume that these have come down from Turbo Pascal - but it still seem

Re: [fpc-pascal] Comp type

2018-01-10 Thread greim
AFAIK there is a small difference between comp and int64 COMP is 63bit + sign bit int64 is 2s complement. I hope I am right here. Markus ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinf

Re: [fpc-pascal] Comp type

2018-01-10 Thread Mattias Gaertner
On Wed, 10 Jan 2018 09:04:12 +0100 Jonas Maebe wrote: > Mattias Gaertner wrote: > > Comp is Int64 div 1. > > No, that is currency. Comp is a plain 64 bit integer. It originally > comes from Turbo Pascal, which did not have a regular 64 bit integer > type. The x87 fpu can be used to perform

Re: [fpc-pascal] Comp type

2018-01-10 Thread Jonas Maebe
Mattias Gaertner wrote: > Comp is Int64 div 1. No, that is currency. Comp is a plain 64 bit integer. It originally comes from Turbo Pascal, which did not have a regular 64 bit integer type. The x87 fpu can be used to perform 64 bit integer math though, so it was originally a 64 bit integer typ

Re: [fpc-pascal] Comp type

2018-01-09 Thread Darius Blaszyk
Comp is Int64 div 1. Thanks for the explanation Mathias! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Comp type

2018-01-09 Thread Mattias Gaertner
On Tue, 09 Jan 2018 22:58:01 +0100 Darius Blaszyk 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 I

[fpc-pascal] Comp type

2018-01-09 Thread Darius Blaszyk
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? Rgds, Darius___ fpc-pascal maill