[futurebasic] Re: [FB] math problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2007 : Group Archive : Group : All Groups

From: Brian Stevens <bstevens33@...>
Date: Tue, 27 Feb 2007 20:18:34 -0700
On Feb 27, 2007, at 4:54 PM, Douglas Stemen wrote:

> This is a real problem for me because my program has records using  
> long integers to store real numbers.

As some others have pointed out, when FB is allowed to convert from  
double to integer it makes some assumptions (and has too). I don't  
know if the application would allow it, but would it be possible to  
store real numbers as real instead of converting to integers?  Code  
like the following needs no coercion of any kind and delivers the  
expected result.

Brian S.

dim as double x, y
x = 1.15
y = 100.00 * x
stop str$(y)