View Single Post
Old 02-08-2008   #1 (permalink)
Kevin Buchan


 
 

What does the $() operator do?

I have googled and I've used get-help. I've even tried my own tests,
but I can't rell what the $() operator does.

I've seen it in people's code and I think I can tell, from the
context, what it does, but I'm mistaken.

#Example 1:
param(
[string] $wsdlLocation = $(throw "Please specify a WSDL
location"),
)

#Example 2
$s = indent "<$($reader.Name) "


I was feeling like I was finally nearing the crest of the learning
curve, to where I can actually use PowerShell instead of simply
running other people's scripts, then I run into this. :-)

Thanks!

--
Kevin Buchan
kevin.bucahn@xxxxxx[nospam]sanders.com
My System SpecsSystem Spec