What is the default value for an uninstalled option in VB6?

I am working with some old code and it defines a global variable like this ...

Public myvar

This variable is never assigned a value, but is later used in the test ...

If myvar <> somevalue then
    'do something
End If

For what values ​​of some value will this be done?

+2
source share
2 answers
  • The default value Empty.
  • "Something will be done" for any meaning other than Empty, 0or ""...
    • ... for the value Nothing, the code will throw an error and "something will not be done."

From the VB6 documentation

, 0, (""), - . . , .

+6

VB6. , myvar "", do something. , .

, , . IsEmpty
...
, 0 .

+4

All Articles