Debugger is getting mixed up

  • Thread starter Thread starter cmdolcet69
  • Start date Start date
C

cmdolcet69

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?
 
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.
 
Back
Top