Swift Posted March 26, 2008 Share Posted March 26, 2008 (edited) Yeah, stupid question I know, but my program is displaying 1.5 sometimes, and it needs to put a 0 there, so its 1.50, but I don't know how to do this, I thought about using Round() but thats not working and I didn't see anything in the helpfile on doing this, is there a simple way of doing this? Also checked the Math UDF, didnt see anything. -thanks R6V2 Edited March 26, 2008 by R6V2 Link to comment Share on other sites More sharing options...
Developers Jos Posted March 26, 2008 Developers Share Posted March 26, 2008 Yeah, stupid question I know, but my program is displaying 1.5 sometimes, and it needs to put a 0 there, so its 1.50, but I don't know how to do this, I thought about using Round() but thats not working and I didn't see anything in the helpfile on doing this, is there a simple way of doing this? Also checked the Math UDF, didnt see anything.-thanks R6V2Check out StringFormat() Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Swift Posted March 26, 2008 Author Share Posted March 26, 2008 (edited) Thanks Jos! Whew! This function has alot of info, it's kinda confusing! EDIT: Hey Jos, would you mind giving me a example on how to do this, im not really understanding all the stuff in the Remarks, and all the specifications... Edited March 26, 2008 by R6V2 Link to comment Share on other sites More sharing options...
weaponx Posted March 26, 2008 Share Posted March 26, 2008 $test = 5.1 StringFormat("%.2f", $test) ;Shows 5.10 Link to comment Share on other sites More sharing options...
Swift Posted March 26, 2008 Author Share Posted March 26, 2008 $test = 5.1StringFormat("%.2f", $test) ;Shows 5.10Aha! Thats what I was looking for, now im going to read exactly how and why it does that! Thanks WeaponX! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now