View Single Post
Old 04-10-2007   #1 (permalink)
DouglasWoods


 
 

No output from write-output

I have this script, which does not run as I expected.
----------------------------------------
function foo($bar)
{
write-output "I got $bar"
}

foo "Hello"
measure-command {foo "World"}
---------------------------------------

Here is the ouput.

---------------------------------------
I got Hello


Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 1
Ticks : 15418
TotalDays : 1.78449074074074E-08
TotalHours : 4.28277777777778E-07
TotalMinutes : 2.56966666666667E-05
TotalSeconds : 0.0015418
TotalMilliseconds : 1.5418
--------------------------------------------------

Why didn't I get a line saying
I got World

Douglas Woods
My System SpecsSystem Spec