Powershell - What does if($variable) test for? -


in powershell, if($variable) test for? testing if variable set, null, true, or else?

it tests whether variable true or whether non-boolean variable can coalesced true. example, each of these return false:

$var #uninitialized $var = "" $var = $false $var = 0 

each of these return true:

$var = "something" $var = $true $var = 1 #or non-zero number 

Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -