Call a function: Difference between revisions
Content added Content deleted
Line 822: | Line 822: | ||
In the shell, there are no argument specifications for functions. Functions obtain their arguments using the positional parameter facilities and functions are simply called by name followed by any arguments that are to be passed: |
In the shell, there are no argument specifications for functions. Functions obtain their arguments using the positional parameter facilities and functions are simply called by name followed by any arguments that are to be passed: |
||
<lang sh> |
<lang sh>sayhello # Call a function in statement context with no arguments |
||
multiply 3 4 # Call a function with two arguments</lang> |
multiply 3 4 # Call a function in statement context with two arguments</lang> |
||
The shell does not support the use of named parameters. |
The shell does not support the use of named parameters. |