Are these two snippets equivalent in VBScript?
If x <> empty
'do something
End if
If not isempty(x)
'dosomething
End if
Context:
I want to rewrite a condition from
If ((Not IsEmpty( Var ) ) And ( Var <> "" ) ) Then
to the less verbose
If Var <> Empty And Var <> "" Then
No; the operator approach would fail for a variant typed as object
(Because the
=
approach would attempt to read the value of the default property of the object)