![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Operations of FormatNumber function Hi, I'm wondering about the FormatNumber function (http:// msdn.microsoft.com/en-us/library/ws343esk(VS.85).aspx). If I call this function with the appropriate arguments to return me a number with only one figure after the decimal point, is this value rounded or simply truncated? That is, given the call as described and the math comes to 1.27, will I be returned 1.2 or 1.3? Thanks, Andy |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Operations of FormatNumber function "Andrew Falanga" <af300wsm@xxxxxx> wrote in message news:545e7f79-20d4-4a87-9410-2dc1ec98c609@xxxxxx Quote: > Hi, > > I'm wondering about the FormatNumber function (http:// > msdn.microsoft.com/en-us/library/ws343esk(VS.85).aspx). If I call > this function with the appropriate arguments to return me a number > with only one figure after the decimal point, is this value rounded or > simply truncated? That is, given the call as described and the math > comes to 1.27, will I be returned 1.2 or 1.3? > > Thanks, > Andy -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Operations of FormatNumber function In microsoft.public.scripting.vbscript message <545e7f79-20d4-4a87-9410- 2dc1ec98c609@xxxxxx>, Thu, 23 Oct 2008 10:35:47, Andrew Falanga <af300wsm@xxxxxx> posted: Quote: > >I'm wondering about the FormatNumber function (http:// >msdn.microsoft.com/en-us/library/ws343esk(VS.85).aspx). If I call >this function with the appropriate arguments to return me a number >with only one figure after the decimal point, is this value rounded or >simply truncated? That is, given the call as described and the math >comes to 1.27, will I be returned 1.2 or 1.3? document.write formatNumber(1.27,1) ' writes 1.3 for me. -- (c) John Stockton, nr London UK. ??@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. In MS OE, choose Tools, Options, Send; select Plain Text for News and E-mail. Don't quote more than is needed, and respond after each quoted part. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Type mismatch: FormatNumber | VB Script | |||
| Authorizing Powershell Operations | PowerShell | |||
| File operations | Vista General | |||
| BUG: Redirecting function contents to a file truncates function lines at the width of the console | PowerShell | |||