From a23d418d78f7c35b2e7aed23ed6beb60e2542b83 Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 19 May 2013 23:41:12 +0200 Subject: 'from' statement documented --- doc/manual.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc') 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 ~~~~~~~~~~~~~~~~ -- cgit 1.4.1-2-gfad0 ntation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log tree commit diff stats
path: root/lib/pure/nimprof.nim.cfg
blob: 1589e7394bd829536f7259680c50ceba7ceb4c9d (plain) (blame)
1