Jump to content

Scope/Function names and labels: Difference between revisions

Added XPL0 explanation.
(Added XPL0 explanation.)
Line 1,068:
[./scope_function_names line 7] in (script)
</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}}==
772

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.