Scope/Function names and labels: Difference between revisions

Content deleted Content added
PureFox (talk | contribs)
Chkas (talk | contribs)
 
(3 intermediate revisions by 2 users not shown)
Line 243:
 
=={{header|EasyLang}}==
<syntaxhighlight lang=text>
# function names are global, the must be
# implemented or declared before usage
Line 862:
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|PascalABC.NET}}==
See [[Delphi]] except of published keyword.
 
=={{header|Perl}}==
Line 946 ⟶ 949:
* This Python Enhancement Proposal: [http://www.python.org/dev/peps/pep-3104/ PEP 3104] introduces the non-local keyword of Python 3.
* And of course, [http://www.youtube.com/watch?v=vt0Y39eMvpI this]!
 
=={{header|Quackery}}==
 
Quackery does not have scoped words. Once a piece of Quackery code is named, that name is available everywhere.
 
Rationale: Quackery is "My First Stack-Oriented Language"; it is a lightweight environment for exploring stack based concatenative programming, coded in under 48k of mostly non-idiomatic Python 3 source with minimal use of libraries, so that every aspect of it can be understood by a novice user. Scoping is not required, so is omitted. If, having tried Quackery, you want to apply this paradigm to a large project, look to a production level language such as Forth or Factor, according to your requirements.
 
While this task refers specifically to function names and labels, it is also relevant that Quackery does not have variables - instead it has named ancillary stacks which, with the observance of a few simple conventions, can be used as local variables while retaining global scope. (Conventions - always leave a stack as you found it, and where that is not possible name it to indicate its implied scope.)
 
=={{header|Racket}}==