summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorJudd <foldl@outlook.com>2022-08-28 05:29:41 +0800
committerGitHub <noreply@github.com>2022-08-27 17:29:41 -0400
commit2b56b38235c7cdb60a952ee4ec684a053eeee47c (patch)
tree741482c2dea48072ce29bdd6c4ac39e9be395b0b /doc
parentde9cbf6af1b3e67ceb78c4fd02c88b48fe762fa8 (diff)
downloadNim-2b56b38235c7cdb60a952ee4ec684a053eeee47c.tar.gz
minor updates on manual (#20258)
* minor updates on manual

1. statement -> keyword:

1. re-phase on the explanation of `import except`: maybe the newer version does not export some of the identifiers;

1. "The original module name is then not accessible" is moved up to the previous paragraph, since it is coupled with 
   the previous paragraph, but not the current one.

1. re-phase on the explanation of _Disabling certain messages_.

* Apply suggestions from code review

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update manual.md

do not use "()".

* Update doc/manual.md

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.md23
1 files changed, 12 insertions, 11 deletions
diff --git a/doc/manual.md b/doc/manual.md
index 73408bd79..49539a48b 100644
--- a/doc/manual.md
+++ b/doc/manual.md
@@ -3944,7 +3944,7 @@ argument in inline calls, as well as a direct mirror of Nim's routine syntax.
   macroResults.add quote do:
     if not `ex`:
       echo `info`, ": Check failed: ", `expString`
-  
+
   # Processing a routine definition in a macro:
   rpc(router, "add") do (a, b: int) -> int:
     result = a + b
@@ -6160,7 +6160,7 @@ as arguments if called in statement form.
     # to perform the task
   do:
     # code to undo it
-  
+
   let num = 12
   # a single colon may be used if there is no initial block
   match (num mod 3, num mod 5):
@@ -6499,7 +6499,7 @@ This is best illustrated by an example:
 Import statement
 ----------------
 
-After the `import` statement, a list of module names can follow or a single
+After the `import` keyword, a list of module names can follow or a single
 module name followed by an `except` list to prevent some symbols from being
 imported:
 
@@ -6512,8 +6512,8 @@ imported:
 
 
 It is not checked that the `except` list is really exported from the module.
-This feature allows us to compile against an older version of the module that
-does not export these identifiers.
+This feature allows us to compile against different versions of the module,
+even when one version does not export some of these identifiers.
 
 The `import` statement is only allowed at the top level.
 
@@ -6548,7 +6548,8 @@ The `include` statement can be used outside the top level, as such:
 Module names in imports
 -----------------------
 
-A module alias can be introduced via the `as` keyword:
+A module alias can be introduced via the `as` keyword, after which the original module name
+is inaccessible:
 
   ```nim
   import std/strutils as su, std/sequtils as qu
@@ -6556,8 +6557,7 @@ A module alias can be introduced via the `as` keyword:
   echo su.format("$1", "lalelu")
   ```
 
-The original module name is then not accessible. The notations
-`path/to/module` or `"path/to/module"` can be used to refer to a module
+The notations `path/to/module` or `"path/to/module"` can be used to refer to a module
 in subdirectories:
 
   ```nim
@@ -6614,7 +6614,7 @@ It is recommended and preferred but not currently enforced that all stdlib modul
 From import statement
 ---------------------
 
-After the `from` statement, a module name followed by
+After the `from` keyword, a module name followed by
 an `import` to list the symbols one likes to use without explicit
 full qualification:
 
@@ -7175,8 +7175,9 @@ Disabling certain messages
 --------------------------
 Nim generates some warnings and hints ("line too long") that may annoy the
 user. A mechanism for disabling certain messages is provided: Each hint
-and warning message contains a symbol in brackets. This is the message's
-identifier that can be used to enable or disable it:
+and warning message is associated with a symbol. This is the message's
+identifier, which can be used to enable or disable the message by putting it
+in brackets following the pragma:
 
   ```Nim
   {.hint[LineTooLong]: off.} # turn off the hint about too long lines