I define the powershell function as below
function t ($a , $b ) {
write-Host '1-', $a
write-Host '2-', $b
}
When calling t(4,5)
give
1- 4 5
2-
instead of natural
1- 4
2- 5
How can I get the second?
I define the powershell function as below
function t ($a , $b ) {
write-Host '1-', $a
write-Host '2-', $b
}
When calling t(4,5)
give
1- 4 5
2-
instead of natural
1- 4
2- 5
How can I get the second?
Kayasax has answered the question in his comment. Function calls do not require parens around the argument(s).
call with
t 4 5
instead of what you did.