Scope modifiers: Difference between revisions

Content added Content deleted
(added Ursala)
Line 350: Line 350:
</lang>
</lang>
By default, every symbol is visible to every other within the same
By default, every symbol is visible to every other within the same
file, and multiple declarations of the same symbol are an error, but the
file, but the scope modifiers #hide and #export can create multiple
scope modifiers #hide and #export can create multiple
scopes within a single file. In this example, the symbol x will have
scopes within a single file. In this example, the symbol x will have
a value of 1,
a value of 1,
Line 368: Line 369:
the #export directive selectively allows an otherwise
the #export directive selectively allows an otherwise
hidden declaration to be visible outside its enclosing
hidden declaration to be visible outside its enclosing
scope, and allows name clashes to be resolved by proximity.
scope.
<lang Ursala>
<lang Ursala>
foo = 1
foo = 1