summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2013-05-10 15:42:05 -0700
committerSimon Hafner <hafnersimon@gmail.com>2013-05-10 15:42:05 -0700
commit40b411fb1c319a74daedce524c5d821b6bdc0e45 (patch)
treecacbd79751c680644836144b5642a5035b4b1268 /lib/system.nim
parent56539fd44d45fe19ca920b108d0963a620e1f2ee (diff)
parent0b5ca95222966d5f8f226c554220e3837c46c4f6 (diff)
downloadNim-40b411fb1c319a74daedce524c5d821b6bdc0e45.tar.gz
Merge pull request #426 from gradha/pr_misc_doc_improvements
Misc doc improvements
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 5dafd6e13..4cdc212b9 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -909,12 +909,17 @@ var programResult* {.exportc: "nim_program_result".}: int
 
 proc quit*(errorcode: int = QuitSuccess) {.
   magic: "Exit", importc: "exit", noDecl, noReturn.}
-  ## stops the program immediately; before stopping the program the
-  ## "quit procedures" are called in the opposite order they were added
-  ## with ``addQuitProc``. ``quit`` never returns and ignores any
-  ## exception that may have been raised by the quit procedures.
-  ## It does *not* call the garbage collector to free all the memory,
-  ## unless a quit procedure calls ``GC_collect``.
+  ## Stops the program immediately with an exit code.
+  ##
+  ## Before stopping the program the "quit procedures" are called in the
+  ## opposite order they were added with ``addQuitProc``. ``quit`` never
+  ## returns and ignores any exception that may have been raised by the quit
+  ## procedures.  It does *not* call the garbage collector to free all the
+  ## memory, unless a quit procedure calls ``GC_collect``.
+  ##
+  ## The proc ``quit(QuitSuccess)`` is called implicitly when your nimrod
+  ## program finishes without incident. A raised unhandled exception is
+  ## equivalent to calling ``quit(QuitFailure)``.
 
 template sysAssert(cond: bool, msg: string) =
   when defined(useSysAssert):