Scope/Function names and labels: Difference between revisions
Content deleted Content added
m awk |
m wiki syntax and spacing |
||
Line 6: | Line 6: | ||
For scope modification facilities see [[Scope modifiers]]. |
For scope modification facilities see [[Scope modifiers]]. |
||
{{ |
{{header|AWK}} |
||
In |
In awk function names are always global and can be referenced in sections of code appearing before the definition: |
||
<lang awk># This program outputs a greeting |
<lang awk># This program outputs a greeting |
||
BEGIN { |
|||
sayhello() # Call the function defined below |
|||
exit |
|||
} |
|||
function sayhello { |
function sayhello { |