Scope modifiers: Difference between revisions

Content added Content deleted
m (add link to Delphi for pascal)
Line 326: Line 326:
The modifiers are <code>local</code> and, for recent versions of Pari, <code>my</code>. See the User's Guide to PARI/GP.
The modifiers are <code>local</code> and, for recent versions of Pari, <code>my</code>. See the User's Guide to PARI/GP.
<!-- needs expansion and clarification -->
<!-- needs expansion and clarification -->

=={{header|Pascal}}==
See [[Scope_modifiers#Delphi | Delphi]]


=={{header|Perl}}==
=={{header|Perl}}==
Line 394: Line 397:


Usually, <code>my</code> is preferable to <code>local</code>, but one thing <code>local</code> can do that <code>my</code> can't is affect the special punctuation variables, like <code>$/</code> and <code>$"</code>. Actually, in perl 5.9.1 and later, <code>my $_</code> is specially allowed and works as you would expect.
Usually, <code>my</code> is preferable to <code>local</code>, but one thing <code>local</code> can do that <code>my</code> can't is affect the special punctuation variables, like <code>$/</code> and <code>$"</code>. Actually, in perl 5.9.1 and later, <code>my $_</code> is specially allowed and works as you would expect.

=={{header|Perl 6}}==
=={{header|Perl 6}}==
Perl 6 has a system of declarators that introduce new names into various scopes.
Perl 6 has a system of declarators that introduce new names into various scopes.