I defined function Add-Numbers($a, $b) { $a + $b } and called it the way I would in C#: Add-Numbers(2, 3). Instead of 5 it prints 2 and 3 on separate lines. Inside the function $b turns out to be empty and $a holds both numbers.
Why does PowerShell bind the arguments this way, and what is the correct calling syntax, especially when an argument is itself an expression or another function call?




