mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
@@ -81,7 +81,7 @@ Advanced options:
|
||||
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`
|
||||
--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"`
|
||||
--docSeeSrcUrl:url activate 'see source' for doc and doc2 commands
|
||||
(see doc.item.seesrc in config/nimdoc.cfg)
|
||||
|
||||
@@ -19,7 +19,7 @@ General Guidelines
|
||||
.. code-block:: nim
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
@@ -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`,
|
||||
is the following:
|
||||
* `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`)
|
||||
|
||||
You can pass any additional options such as `-d:leanCompiler` if you don't need
|
||||
|
||||
@@ -6707,7 +6707,7 @@ Example:
|
||||
embedsC()
|
||||
|
||||
``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
|
||||
proc foobar() {.importc:"$1".}
|
||||
|
||||
@@ -1703,7 +1703,7 @@ noRewrite pragma
|
||||
Term rewriting macros and templates are currently greedy and
|
||||
they will rewrite as long as there is a match.
|
||||
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,
|
||||
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).
|
||||
|
||||
|
||||
- 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
|
||||
measured by the number of calls to achieve a concrete high level action. The
|
||||
|
||||
@@ -423,7 +423,7 @@ complete list.
|
||||
Define Effect
|
||||
====================== =========================================================
|
||||
``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)
|
||||
``danger`` Turns off all runtime checks and turns on the optimizer.
|
||||
``useFork`` Makes ``osproc`` use ``fork`` instead of ``posix_spawn``.
|
||||
|
||||
@@ -14,7 +14,7 @@ Notation meaning
|
||||
===================== =====================================================
|
||||
``$#`` use first or next 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.
|
||||
``$$`` produces a single ``$``
|
||||
``$1`` use first argument
|
||||
|
||||
Reference in New Issue
Block a user