realbasic-nug
[Top] [All Lists]

Re: RB2005 Windows Math

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: RB2005 Windows Math
From: D Jungk <rb at flippingdades dot com>
Date: Tue, 29 Nov 2005 18:07:29 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <7b dot 526bb235 dot 30be2bb1 at aol dot com>
On Tuesday 29 November 2005 5:09 pm, GAmoore at aol dot com wrote:
> I think this may be of interest to many people here. Evidently there is
> some bug in RB2005
> when compiled to Windows (from the Mac version) which produces incorrect
> arithmetic values.
> I have spent hours on this and there is no   rhyme or reason to it. The
> same code works fine on Mac
> (both IDE and compiled) and I   am told it works in the Windows IDE but not
> when compiled.
> //////////////////////////////////////////////////
>    dim i, a, b, c, x, y as integer
>    dim s as String
>
>
>    s = "x and y should be the same : 13, 29, ..." + EndOfLine
>    for i = 0 to 10
>      a = 13 + (i*7) + (i*17) + (i*41) + (i mod 3) + (i mod 11) + (i mod 19)
>      x = a mod 52
>      // x is the basic computation... what follows is an effort to get
> around using the mod function
>      // but it too fails
>      b =a \ 52
>      c = 52*b
>      y = a - c
>      s = s + "x = " + str(x) + "   y = " + str(y)
>      s = s + " and a,b,c = " + str(a) + ", " + str(b) + ", " + str(c) +
> EndOfLine
>    next
>    MsgBox s
> ---------------------------------------------------------------------------
For what it's worth, your code seems to work properly on Linux with Pentium 
IV.

DJ
_______________________________________________
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>