Champak Posted June 12, 2008 Share Posted June 12, 2008 (edited) Nothing big, but I want to round down no matter what the number is after the decimal point. As it is, I'm just stripping everything after the decimal, but I would prefer coding a little tighter and I believe I can get it within stringformat but I don't know how. Here is what I've tried so far, but only the third is giving me what I want. MsgBox(0,0,StringFormat( "%.0f",123.63576875665)) MsgBox(0,0,Round(123.63576875665)) MsgBox(0,0,StringLeft(123.63576875665,StringInStr(123.63576875665,".")-1)) Edited June 12, 2008 by Champak Link to comment Share on other sites More sharing options...
sandin Posted June 12, 2008 Share Posted June 12, 2008 int() ? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
Champak Posted June 12, 2008 Author Share Posted June 12, 2008 Thanks. Link to comment Share on other sites More sharing options...
smashly Posted June 12, 2008 Share Posted June 12, 2008 Floor() Link to comment Share on other sites More sharing options...
Champak Posted June 13, 2008 Author Share Posted June 13, 2008 Ceiling() and Floor()...never noticed those before, thanks. 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