Jump to content

How to make sure a number will always have


 Share

Recommended Posts

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 by R6V2
Link to comment
Share on other sites

  • Developers

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

Check 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

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 by R6V2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...