On May 31, 2007, at 12:37 PM, Norman Palardy wrote:
>
> On 31-May-07, at 10:18 AM, Dennis Birch wrote:
>
>> On 5/31/07, Norman Palardy <npalardy at great-white-software dot com> wrote:
>>>
>>> On 31-May-07, at 10:06 AM, Dennis Birch wrote:
>>>> But it appears to me that it's a case of RB number constants being
>>>> handled differently, which may be within the engineers' control.
>>>
>>> Since constants don't let us specify their exact type it could be
>>> simply how promoting a the single to a double behaves
>>>
>>> They derive their type from the contents and so you can't say this
>>> const is a double, this one a single, this one a Uint64
>>
>> But you could expect RB to offer consistent behavior between
>> platforms.
>
> I'd expect consistent behavior in lots of places
>
> Try this one
> Define a NUMBER constant on a window called constUint64
> Set its value to &h8000000000000000
> Note that the const editor will say it's a string but you need to
> change it to number
>
> Put this code in a button or something
>
> const localConstUint64 = &h8000000000000000
> dim i as Uint64 = &h8000000000000001
>
> if i > constUint64 then
> msgbox "module const ok"
> else
> msgbox "module const bug"
> end if
>
> if i > LocalConstUint64 then
> msgbox "local const ok"
> else
> msgbox "local const bug"
> end if
>
> Both comparisons should result in i being larger than the const but
> try it :)
>
> <http://www.realsoftware.com/feedback/viewreport.php?
> reportid=zeagcgso>
Or try this code:
dim N as UInt64 = constUInt64
and inspect the result in the debugger -- I see 0.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|