Call a function: Difference between revisions
Content added Content deleted
m (promoted to task) |
m (→{{header|AWK}}) |
||
Line 102: | Line 102: | ||
; Partial application is impossible. |
; Partial application is impossible. |
||
</lang> |
</lang> |
||
=={{header|AWK}}== |
|||
The awk interpreter reads the entire script prior to processing, so functions can be called from sections of code appearing before the definition. |
|||
<lang awk>BEGIN { |
|||
sayhello() # Call a function with no parameters in statement context |
|||
b=squareit(3) # Obtain the return value from a function with a single parameter in expressive context |
|||
}</lang> |
|||
=={{header|C}}== |
=={{header|C}}== |
||
<lang c>/* function with no argument */ |
<lang c>/* function with no argument */ |