more "eg" fixes
This commit is contained in:
parent
0a686659d2
commit
5e9dd81baa
8 changed files with 8 additions and 8 deletions
|
|
@ -81,7 +81,7 @@ Advanced options:
|
||||||
if these are nonexistent, will use project path
|
if these are nonexistent, will use project path
|
||||||
-b, --backend:c|cpp|js|objc sets backend to use with commands like `nim doc` or `nim r`
|
-b, --backend:c|cpp|js|objc sets backend to use with commands like `nim doc` or `nim r`
|
||||||
--docCmd:cmd if `cmd == skip`, skips runnableExamples
|
--docCmd:cmd if `cmd == skip`, skips runnableExamples
|
||||||
else, runs runnableExamples with given options, eg:
|
else, runs runnableExamples with given options, e.g.:
|
||||||
`--docCmd:"-d:foo --threads:on"`
|
`--docCmd:"-d:foo --threads:on"`
|
||||||
--docSeeSrcUrl:url activate 'see source' for doc and doc2 commands
|
--docSeeSrcUrl:url activate 'see source' for doc and doc2 commands
|
||||||
(see doc.item.seesrc in config/nimdoc.cfg)
|
(see doc.item.seesrc in config/nimdoc.cfg)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ General Guidelines
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
|
|
||||||
proc someproc*(s: string, foo: int) =
|
proc someproc*(s: string, foo: int) =
|
||||||
## Use single backticks for inline code, eg: `s` or `someExpr(true)`.
|
## Use single backticks for inline code, e.g.: `s` or `someExpr(true)`.
|
||||||
## Use a backlash to follow with alphanumeric char: `int8`\s are great.
|
## Use a backlash to follow with alphanumeric char: `int8`\s are great.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ you can rebuild the compiler as follows:
|
||||||
A faster approach if you don't need to run the full bootstrapping implied by `koch boot`,
|
A faster approach if you don't need to run the full bootstrapping implied by `koch boot`,
|
||||||
is the following:
|
is the following:
|
||||||
* `pathto/nim c --lib:lib -d:release -o:bin/nim_temp compiler/nim.nim`
|
* `pathto/nim c --lib:lib -d:release -o:bin/nim_temp compiler/nim.nim`
|
||||||
Where `pathto/nim` is any nim binary sufficiently recent (eg `bin/nim_cources`
|
Where `pathto/nim` is any nim binary sufficiently recent (e.g. `bin/nim_cources`
|
||||||
built during bootstrap or `$HOME/.nimble/bin/nim` installed by `choosenim 1.2.0`)
|
built during bootstrap or `$HOME/.nimble/bin/nim` installed by `choosenim 1.2.0`)
|
||||||
|
|
||||||
You can pass any additional options such as `-d:leanCompiler` if you don't need
|
You can pass any additional options such as `-d:leanCompiler` if you don't need
|
||||||
|
|
|
||||||
|
|
@ -6707,7 +6707,7 @@ Example:
|
||||||
embedsC()
|
embedsC()
|
||||||
|
|
||||||
``nimbase.h`` defines ``NIM_EXTERNC`` C macro that can be used for
|
``nimbase.h`` defines ``NIM_EXTERNC`` C macro that can be used for
|
||||||
``extern "C"`` code to work with both ``nim c`` and ``nim cpp``, eg:
|
``extern "C"`` code to work with both ``nim c`` and ``nim cpp``, e.g.:
|
||||||
|
|
||||||
.. code-block:: Nim
|
.. code-block:: Nim
|
||||||
proc foobar() {.importc:"$1".}
|
proc foobar() {.importc:"$1".}
|
||||||
|
|
|
||||||
|
|
@ -1703,7 +1703,7 @@ noRewrite pragma
|
||||||
Term rewriting macros and templates are currently greedy and
|
Term rewriting macros and templates are currently greedy and
|
||||||
they will rewrite as long as there is a match.
|
they will rewrite as long as there is a match.
|
||||||
There was no way to ensure some rewrite happens only once,
|
There was no way to ensure some rewrite happens only once,
|
||||||
eg. when rewriting term to same term plus extra content.
|
e.g. when rewriting term to same term plus extra content.
|
||||||
|
|
||||||
``noRewrite`` pragma can actually prevent further rewriting on marked code,
|
``noRewrite`` pragma can actually prevent further rewriting on marked code,
|
||||||
e.g. with given example ``echo("ab")`` will be rewritten just once:
|
e.g. with given example ``echo("ab")`` will be rewritten just once:
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ changed in the future.
|
||||||
an in-place version should get an ``-In`` suffix (``replaceIn`` for this example).
|
an in-place version should get an ``-In`` suffix (``replaceIn`` for this example).
|
||||||
|
|
||||||
|
|
||||||
- Use `subjectVerb`, not `verbSubject`, eg: `fileExists`, not `existsFile`.
|
- Use `subjectVerb`, not `verbSubject`, e.g.: `fileExists`, not `existsFile`.
|
||||||
|
|
||||||
The stdlib API is designed to be **easy to use** and consistent. Ease of use is
|
The stdlib API is designed to be **easy to use** and consistent. Ease of use is
|
||||||
measured by the number of calls to achieve a concrete high level action. The
|
measured by the number of calls to achieve a concrete high level action. The
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ complete list.
|
||||||
Define Effect
|
Define Effect
|
||||||
====================== =========================================================
|
====================== =========================================================
|
||||||
``release`` Turns on the optimizer.
|
``release`` Turns on the optimizer.
|
||||||
More aggressive optimizations are possible, eg:
|
More aggressive optimizations are possible, e.g.:
|
||||||
``--passC:-ffast-math`` (but see issue #10305)
|
``--passC:-ffast-math`` (but see issue #10305)
|
||||||
``danger`` Turns off all runtime checks and turns on the optimizer.
|
``danger`` Turns off all runtime checks and turns on the optimizer.
|
||||||
``useFork`` Makes ``osproc`` use ``fork`` instead of ``posix_spawn``.
|
``useFork`` Makes ``osproc`` use ``fork`` instead of ``posix_spawn``.
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Notation meaning
|
||||||
===================== =====================================================
|
===================== =====================================================
|
||||||
``$#`` use first or next argument
|
``$#`` use first or next argument
|
||||||
``$name`` use named argument, you can wrap the named argument
|
``$name`` use named argument, you can wrap the named argument
|
||||||
in curly braces (eg. ``${name}``) to separate it from
|
in curly braces (e.g. ``${name}``) to separate it from
|
||||||
the next characters.
|
the next characters.
|
||||||
``$$`` produces a single ``$``
|
``$$`` produces a single ``$``
|
||||||
``$1`` use first argument
|
``$1`` use first argument
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue