Jump to content
Sign in to follow this  

Fix Number output to from 0 to 0.00 ?

Recommended Posts

I tried many searches for format number, fix number, set, round, etc.....

I have a number lets say "0" and instead of showing as "0" when output i want it to be "0.00" or instead of .1 - 0.10 ?

Thanks in advance.....

Edited by inov8iv

Share this post

Link to post
Share on other sites

I am not entirely sure on this, but i think StringFormat() is what you are looking for..

eg, for 2 decimal places:

$no = 5.1

$string = StringFormat("$no = %.2f", $no)
msgbox(0, "", $string)



Heh, thank you, I figured it would not be to difficult, it was just a matter of finding the proper format. I ended up using.

$Variable = .1

StringFormat(" %.2f ", $Variable)

output was 0.10

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...