mirror of
https://github.com/nim-lang/Nim.git
synced 2026-03-03 23:28:31 +00:00
Adds using statement to the one and only true index.
This commit is contained in:
@@ -2206,12 +2206,12 @@ Instead of:
|
||||
Using statement
|
||||
---------------
|
||||
|
||||
The using statement provides syntactic convenience for procs that heavily use a
|
||||
single contextual parameter. When applied to a variable or a constant, it will
|
||||
instruct Nimrod to automatically consider the used symbol as a hidden leading
|
||||
parameter for any procedure calls, following the using statement in the current
|
||||
scope. Thus, it behaves much like the hidden `this` parameter available in some
|
||||
object-oriented programming languages.
|
||||
The `using statement`:idx: provides syntactic convenience for procs that
|
||||
heavily use a single contextual parameter. When applied to a variable or a
|
||||
constant, it will instruct Nimrod to automatically consider the used symbol as
|
||||
a hidden leading parameter for any procedure calls, following the using
|
||||
statement in the current scope. Thus, it behaves much like the hidden `this`
|
||||
parameter available in some object-oriented programming languages.
|
||||
|
||||
.. code-block:: nimrod
|
||||
|
||||
|
||||
Reference in New Issue
Block a user