Add Documentation (#13811)

* Add more Docs and runnableExamples
This commit is contained in:
Juan Carlos 2020-03-31 10:47:57 -03:00 • committed by GitHub
commit 42d2c3088e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 135 additions and 19 deletions

View file

@ -12,7 +12,14 @@
## (e.g. you can navigate with the arrow keys). On Windows ``system.readLine``
## is used. This suffices because Windows' console already provides the
## wanted functionality.
##
## **Examples:**
##
## .. code-block:: nim
## echo readLineFromStdin("Is Nim awesome? (Y/n):")
## var userResponse: string
## doAssert readLineFromStdin("How are you?:", line = userResponse)
## echo userResponse
{.deadCodeElim: on.} # dce option deprecated
when defined(Windows):
@ -66,4 +73,3 @@ else:
historyAdd(buffer)
linenoise.free(buffer)
result = true