Debugger is getting mixed up

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?
 
J

James Hahn

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Booleans 14
Sql vs Oledb error 3
HttpWebRequest POST problem 2
InternetReadFile error 2
Importing Text 2
Passing string as macro parameter 1
memory leak? 3
Returning UDP traffic in real-time and control latency 2

Top