summary refs log tree commit diff stats
path: root/doc/manual.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual.txt')
-rw-r--r--doc/manual.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/manual.txt b/doc/manual.txt
index dabff3d69..0a9aec8d0 100644
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -4708,7 +4708,11 @@ fatal pragma
 ------------
 The `fatal`:idx: pragma is used to make the compiler output an error message
 with the given content. In contrast to the ``error`` pragma, compilation
-is guaranteed to be aborted by this pragma.
+is guaranteed to be aborted by this pragma. Example:
+
+.. code-block:: nimrod
+  when not defined(objc):
+    {.fatal: "Compile this program with the objc command!".}
 
 warning pragma
 --------------
@@ -5053,6 +5057,18 @@ Note that this pragma is somewhat of a misnomer: Other backends will provide
 the same feature under the same name.
 
 
+Extern pragma
+-------------
+Like ``exportc`` or ``importc`` the `extern`:idx: pragma affects name
+mangling. The string literal passed to ``extern`` can be a format string:
+
+.. code-block:: Nimrod
+  proc p(s: string) {.extern: "prefix$1".} =
+    echo s
+
+In the example the external name of ``p`` is set to ``prefixp``.
+
+
 Bycopy pragma
 -------------