summary refs log tree commit diff stats
path: root/doc/manual/procs.txt
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-14 02:11:39 +0100
committerAraq <rumpf_a@web.de>2014-11-14 02:11:39 +0100
commit2b9b09e0521802a92105d0e351ccc6176cadd541 (patch)
treee68e0c83a9a65eac82d7d0eafed197ae3e7b4c94 /doc/manual/procs.txt
parent03b152ac66e2e40d840f0ab64cc1edba6593b2c9 (diff)
downloadNim-2b9b09e0521802a92105d0e351ccc6176cadd541.tar.gz
fixes #1470
Diffstat (limited to 'doc/manual/procs.txt')
-rw-r--r--doc/manual/procs.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/manual/procs.txt b/doc/manual/procs.txt
index 8baf01dbb..5fda7bb0f 100644
--- a/doc/manual/procs.txt
+++ b/doc/manual/procs.txt
@@ -69,6 +69,24 @@ notation. (Thus an operator can have more than two parameters):
   assert `*+`(3, 4, 6) == `*`(a, `+`(b, c))
 
 
+Export marker
+-------------
+
+If a declared symbol is marked with an `asterisk`:idx: it is exported from the
+current module:
+
+.. code-block:: nim
+
+  proc exportedEcho*(s: string) = echo s
+  proc `*`*(a: string; b: int): string =
+    result = newStringOfCap(a.len * b)
+    for i in 1..b: result.add a
+
+  var exportedVar*: int
+  const exportedConst* = 78
+  type ExportedType* = distinct int
+
+
 Method call syntax
 ------------------