Scope/Function names and labels: Difference between revisions

m (Added Sidef language)
Line 268:
def M(x): if x == 1 then F(x) else 2 end;</lang>
If F and M are not required to be top-level functions, then both F and M could be defined as inner functions of the same enclosing function.
 
=={{header|Oforth}}==
Functions are global and must be defined before use.
Methods are global and must be declared before use. They can be used before a method implementation.
 
=={{header|Perl 6}}==
1,015

edits