|
Post by kokenge on Sept 9, 2009 16:39:13 GMT -5
This returns 0 and 0.0d instead of 0 and 0 sqliteconnect #mem, ":memory:" mem$ = "CREATE TABLE x(i1 int,i2 float)" #mem execute(mem$) mem$ = "INSERT INTO x values (0,0)" #mem execute(mem$) mem$ = "select * from x" #mem execute(mem$) #row = #mem #nextrow() print #row i1() print #row i2() wait
|
|
metro
Full Member
Posts: 180
|
Post by metro on Nov 27, 2010 8:00:09 GMT -5
G'day all
was this ever resolved? I have a problem where the calculated result should be 0 and I get 0.0d
any help appreciated
regards
Laurie
|
|
metro
Full Member
Posts: 180
|
Post by metro on Nov 27, 2010 8:26:03 GMT -5
back again
as the answer was the result of a calculation of a percentage I used the following
if percent=0 then percent=int(percent)
this did solve the problem however I would like to know if this an acceptable way round the problem or is there a better way
thanks in advance
Laurie
|
|
|
Post by kokenge on Nov 27, 2010 10:38:54 GMT -5
Yes this is a well known problem. And I do what you do to solve it. Far as I know there is no other work around.
However it is such a serious problem, that it has forced me to convert some major systems away from Run Basic.
|
|
|
Post by kokenge on Nov 28, 2010 11:22:32 GMT -5
OOPS!
Actually I don't do exactly as you do to solve it. I use the following to solve the 0.0d problem.
if x = 0 then x = 0
Hope this helps. Dan
|
|