diff options
Diffstat (limited to 'doc/manual.txt')
-rw-r--r-- | doc/manual.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/manual.txt b/doc/manual.txt index f7b2314c1..4d2cd6a62 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -4178,6 +4178,25 @@ module name followed by an ``except`` to prevent some symbols to be imported: echo "$1" % "abc" +From import statement +~~~~~~~~~~~~~~~~~~~~~ + +After the `from`:idx: statement a module name follows followed by +an ``import`` to list the symbols one likes to use without explict +full qualification: + +.. code-block:: nimrod + from strutils import `%` + + echo "$1" % "abc" + # always possible: full qualification: + echo strutils.replace("abc", "a", "z") + +It's also possible to use ``from module import nil`` if one wants to import +the module but wants to enforce fully qualified access to every symbol +in ``module``. + + Export statement ~~~~~~~~~~~~~~~~ |