Debugger is getting mixed up

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cmdolcet69

    Debugger is getting mixed up

    I have the fololwing code, it is simple yet the flag will never be hit
    for some odd reason

    Dim STRdata as string
    Dim setRedFlag as boolean

    If STRdata = "" then
    setRedFlag = true
    end if


    When i debug the line I get a string value for STRdata = "1.00"
    however if STRdata = ""

    and i add watch on STRdata= it will give me a value of true

    Why is the debugger getting mixed up?



  • James Hahn

    #2
    Re: Debugger is getting mixed up

    This is answered in the thread where you first asked the question. Put
    simply, you cannot rely on the characters displayed in a debugger watch to
    prove that a string is equal to "" or to nothing. A string can include
    things that are not displayable.

    "cmdolcet69 " <colin_dolcetti @hotmail.comwro te in message
    news:1f5b76af-09d6-462b-981d-345f136d026f@2g 2000hsn.googleg roups.com...
    >I have the fololwing code, it is simple yet the flag will never be hit
    for some odd reason
    >
    Dim STRdata as string
    Dim setRedFlag as boolean
    >
    If STRdata = "" then
    setRedFlag = true
    end if
    >
    >
    When i debug the line I get a string value for STRdata = "1.00"
    however if STRdata = ""
    >
    and i add watch on STRdata= it will give me a value of true
    >
    Why is the debugger getting mixed up?
    >
    >
    >

    Comment

    Working...