From 2b9b09e0521802a92105d0e351ccc6176cadd541 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 14 Nov 2014 02:11:39 +0100 Subject: [PATCH] fixes #1470 --- doc/manual/procs.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/manual/procs.txt b/doc/manual/procs.txt index 8baf01dbb4..5fda7bb0ff 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 ------------------