Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. What else would you expect?

What else would you expect?

Scheduled Pinned Locked Moved The Weird and The Wonderful
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kmoorevs
    wrote on last edited by
    #1
        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

    L 1 Reply Last reply
    0
    • K kmoorevs
          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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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)

      K 1 Reply Last reply
      0
      • L Lost User

        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)

        K Offline
        K Offline
        kmoorevs
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups