What else would you expect?
-
strNumber = "0" strResult = FormatNumber(strNumber, 0, TriState.True, TriState.False, TriState.False)
returns "0" as I expected, however
strResult = FormatNumber(strNumber, 0, TriState.False, TriState.False, TriState.False)
did not... :doh: What was I not thinking? :laugh:
"Go forth into the source" - Neal Morse
-
strNumber = "0" strResult = FormatNumber(strNumber, 0, TriState.True, TriState.False, TriState.False)
returns "0" as I expected, however
strResult = FormatNumber(strNumber, 0, TriState.False, TriState.False, TriState.False)
did not... :doh: What was I not thinking? :laugh:
"Go forth into the source" - Neal Morse
kmoorevs wrote:
What was I not thinking? :laugh:
You weren't thinking that '0' without the trailing 0 would be ''. It is only so for fractionals, according to the docs, so how is '0' a fractional number? And what is TryState.UseDefault? Is it the default of the bool-type, or a default that is specific to that function? Which is it, true or false? :wtf: FormatNumber Function (Visual Basic)[^]
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
kmoorevs wrote:
What was I not thinking? :laugh:
You weren't thinking that '0' without the trailing 0 would be ''. It is only so for fractionals, according to the docs, so how is '0' a fractional number? And what is TryState.UseDefault? Is it the default of the bool-type, or a default that is specific to that function? Which is it, true or false? :wtf: FormatNumber Function (Visual Basic)[^]
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
Eddy Vluggen wrote:
And what is TryState.UseDefault?
Definitely not something I would try or trust for this function! (at least where I was using it) Supposedly, it's based on the computer's regional settings, but I couldn't nail it down to exactly where.
"Go forth into the source" - Neal Morse