New topic: Strange RBScript problem
<http://forums.realsoftware.com/viewtopic.php?t=38378> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message Carl Adler Post subject: Strange RBScript problemPosted: Tue Mar 29, 2011 9:36 am Joined: Thu Apr 05, 2007 11:35 am Posts: 95 Following a suggestion made here several years ago, I created an App with two textfields and a pushbutton. I also created a class called Evalit with super RBScript. In its print event handler I put window1.TextField2.text=msg and in the pushbutton action I put Dim expression As String = textfield1.text Dim eval As New EvalIt eval.reset eval.Source = "Dim x As double" + EndOfLine + "x = " + expression + EndOfLine + "print Str(x)" eval.Run Now putting 6000*400*20 in textfield1 and pressing the button I get correctly: 4.8e7 Starting with 4.8e7*4000, yields correctly 1.920000e+11 However 6000*400*20*4000 YIELDS -1.273528e+9 This is true in RB2009, RS2010, and 2011 Strangely 6000+400+20+4000 6000/400/20/4000 and even 6000*400*20/4000 all give correct answers. I am baffled. Help? Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
