title: how to use expressions as function parameters in powershell
body: <p>This is a very simple task in every language I have ever used, but I can't seem to figure it out in PowerShell.  An example of what I'm talking about in C:</p>
  
  <pre><code>abs(x + y)
  </code></pre>
  
  <p>The expression <code>x + y</code> is evaluated, and the result passed to <code>abs</code> as the parameter... how do I do that in PowerShell?  The only way I have figured out so far is to create a temporary variable to store the result of the expression, and pass that.</p>
  
  <p>PowerShell seems to have very strange grammar and parsing rules that are constantly catching me by surprise, just like this situation.  Does anyone know of documentation or a tutorial that explains the basic underlying theory of the language?  I can't believe these are all special cases, there must be some rhyme or reason that no tutorial I have yet read explains.  And yes, I've read <a href="https://stackoverflow.com/questions/496234/what-tutorial-do-you-recommend-for-learning-powershell">this question</a>, and all of those tutorials are awful.  I've pretty much been relegated to learning from existing code.</p>