[Lazarus] Tprogressbar and positional info as ptrint.

Martin lazarus at mfriebe.de
Tue Dec 11 19:06:11 CET 2012


On 11/12/2012 17:55, Andrew Brunner wrote:
> On 12/05/2012 01:48 PM, Andrew Brunner wrote:
>> I'm getting overflow exceptions on values greater than integer.  Can 
>> someone revise all values from integer to ptrint so on 64 bit systems 
>> it will be valid.
>
> Ok, I have a patch for the LCL but before we get further I think we 
> need more discussion on ptrInt vs actual use of Int64 on 32bit systems.
>
> Great news!  The widget set on GTK2 automatically scales the min/max 
> value and just passes a fraction of the filler and GTK2 does the rest.
>
> So the question becomes, what is the best variable to use for 
> allowance as valid Min/Max/Position? I think at this point it is 
> safest to use PtrInt but one could make the case for Int64 if Int64 is 
> widely used in TStreams - even on 32bit oses.
>
> So the question becomes... Is the use of int64  actually ubiquitous on 
> a 32bit system?  If so, it may stand to reason that the values of 
> Progress bar be expanded to Int64 even on 32bit systems.
>
> http://bugs.freepascal.org/view.php?id=23471
>
> Any feedback or ideas are welcome.

   IMHO ptrint is the wrong choice. it invites to write code that can 
not be ported. and leaves unreadable LFM.

If streams use int64, and this is for the purpose of copy those values, 
then it must be int64 too (or qword, if it can't be negative ,and should 
have the full range).






More information about the Lazarus mailing list