mdt - Is this VBScript string comparison to the empty string redundant? -


i'm dealing collection of vbscript code (microsoft deployment toolkit) , see follow idiom when comparing string see if has given value:

if (oenvironment.item("isosupgrade") <> "" , oenvironment.item("isosupgrade") = "1") 

oenvironment.item property imagine return null/nothing/empty (haven't wrapped head around subtle differences).

does first comparison serve purpose? i'm guessing don't understand be. surely if the equality comparison returns true inequality comparison well, right? missing? null/nothing/empty?

you're right: if second condition true, first true. think first condition there completeness , makes sure "isosupgrade" isn't empty/null.

don't worry, you're not missing ;-)


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -