Scope/Function names and labels: Difference between revisions
m
Added Sidef language
m (→{{header|Go}}: minor tweaks) |
m (Added Sidef language) |
||
Line 423:
sum = 8
</pre>
=={{header|Sidef}}==
In Sidef, the same rule which is applied to variable scoping, is applied to functions and classes as well, which means that a function defined inside another function is not visible outside the current scope.
<lang ruby># Nested functions
func outer {
func inner {}; # not visible outside
}
# Nested classes
class Outer {
class Inner {}; # not visisble outside
}</lang>
=={{header|Tcl}}==
|