implemented 'import except'
This commit is contained in:
parent
0ef08e49e7
commit
92e10e4b18
14 changed files with 120 additions and 95 deletions
|
|
@ -3741,6 +3741,19 @@ This is best illustrated by an example:
|
|||
return x + 1
|
||||
|
||||
|
||||
Import statement
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
After the import statement a list of module names can follow or a single
|
||||
module name followed by an ``except`` to prevent some symbols to be imported:
|
||||
|
||||
.. code-block:: nimrod
|
||||
import strutils except `%`
|
||||
|
||||
# doesn't work then:
|
||||
echo "$1" % "abc"
|
||||
|
||||
|
||||
Scope rules
|
||||
-----------
|
||||
Identifiers are valid from the point of their declaration until the end of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue