Scope/Function names and labels: Difference between revisions
Content added Content deleted
(Added XPL0 explanation.) |
|||
Line 1,068: | Line 1,068: | ||
[./scope_function_names line 7] in (script) |
[./scope_function_names line 7] in (script) |
||
</pre> |
</pre> |
||
=={{header|XPL0}}== |
|||
Function names follow the scoping rules of Algol. A function is a |
|||
procedure that returns a value. |
|||
A procedure name is visible from the point it's declared to the end of |
|||
the procedure in which its declaration appears. A complete program is a |
|||
procedure, informally called "main." |
|||
A procedure name is also visible in any sub-procedures that might be |
|||
nested in the procedure. If the same name is declared at different levels |
|||
in nested procedures, the most local declaration is used. Procedures can be nested up to eight levels deep. |
|||
There are no labels in XPL0 (except for inline assembly code). |
|||
=={{header|zkl}}== |
=={{header|zkl}}== |