New topic: 

Simple Calculations? e+2?

<http://forums.realsoftware.com/viewtopic.php?t=25893>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       dwigs           Post subject: Simple Calculations? e+2?Posted: 
Mon Jan 05, 2009 9:39 pm                        
Joined: Mon Jan 05, 2009 9:35 pm
Posts: 1              Hello, I am creating an application to perform a pretty 
basic calculation.

What I have so far:
editfield1 is a simple edit field that takes in a number (ex: 1450 for this 
example)
statictext1 is what displays the final answer to the calculation

And heres the code:
Code:dim answer as variant
dim rating as variant
rating=editfield1.text
answer=rating*0.22+14
statictext1.text = answer


Now, as you can see, it is taking the editfield and putting it into the 
variable "rating" and then answer is calculating the "Rating" and then 
calculating it with the formula.
Statictext1 simply displays Answer (To the equation)

The outcome:
The outcome should be 333, however it comes out as 3.33e+2, I put this into 
Spotlight, and it calculates 333 when I put in: "3.33e+2" . How can I get it to 
correctly calculate with the formula above?

Is my code wrong? Sorry, I look like a complete and utter noob. However I'm 
trying to get into REALbasic and so far so good (Except for this here)   
                            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 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to