Scope/Function names and labels: Difference between revisions

→‎{{header|Phix}}: added labels
(Added XPL0 explanation.)
(→‎{{header|Phix}}: added labels)
Line 712:
Functions are private (restricted to a single file) by default, or can be made global by prefixing the definition with the global keyword to make it visible everywhere.<br>
Functions within classes are either private (can only be called from within the class definition) or public (can be called by anything that manages to get it's grubby little mitts on an instance of it). The containing classes themselves can be private or public as above, but if an instance of a private class is handed over, any recipient has full access to anything declared as public within it (but naturally they won't have the ability to create an instance of a private class).
 
There are no labels in Phix except for inline assembly code. Top-level #ilASM{} can use the special syntax :% (also :<, :>, and :!, see pops.e for details) to declare global labels, typically opcodes such as :%opAlloc, otherwise normal labels, declared with :: syntax, are [only] visible across all #ilASM{} in the same file or routine.
 
=={{header|PL/I}}==
7,795

edits