Consider the following PowerShell script:
function Alpha {
# write-output 'Uncomment this line and see what happens.';
return 65;
}
function Bravo {
$x = Alpha;
$y = $x -eq 65;
return $y;
}
$z = Bravo;
echo $z;
On my computer (which is running Windows XP SP3, .NET 4.0, and PowerShell 2.0 RTM), when the script is run, the script's output is as expected (True
). However, when "the line" is uncommented (and the script is run again), instead of seeing the same output prepended by Uncomment this line...
, I am only seeing 65
. Can someone please explain what is going on? Thanks.