realbasic-nug
[Top] [All Lists]

Re: any reason for &h to return a double anymore?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: any reason for &h to return a double anymore?
From: Mike Woodworth <mike at divergentmedia dot com>
Date: Mon, 31 Jul 2006 10:44:55 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <06FEF51C-6CBB-4821-ADC6-FC4D5DE96795 at divergentmedia dot com> <502BFCE3-588B-4A06-B150-7448110F2531 at mobleybros dot com>
right here:

http://support.realsoftware.com/feedback/viewreport.php? reportid=kcgycxwe

was just waiting for at least one person to tell me im not crazy :)

mike
--
Mike Woodworth
mike at divergentmedia dot com



On Jul 31, 2006, at 10:36 AM, Phil M wrote:

On Jul 31, 2006, at 10:19 AM, Mike Woodworth wrote:

i was tracking down a bug in a chunk of declares the other day, when i found something which took me awhile to understand - i had written a function to convert rb integers to fixed datatype. it read like this:

function int2fixed (i as integer) as integer
        return i * &hFFFF
end

simple... easy to read... gave the wrong answers?? it appears &h is returning a double, causing my int to be multiplied in double space leading to rounding errors. when i switched it to use bitshiftleft the problems went away.

my question to the list is - now that we have int64, can anyone conceive of a reason we would want &h to return a double? to the best of my knowledge &h will always be *trying* to represent an integer value, correct? is it time to file a feature request? or is there still some logic to this choice?

Very good point.  Where is the feedback ID?


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>