fix wrong examples (#17350)
* fix wrong examples * Update lib/std/compilesettings.nim * Update lib/std/compilesettings.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
parent
be49505719
commit
5dff66b35a
1 changed files with 6 additions and 11 deletions
|
|
@ -43,27 +43,22 @@ type
|
||||||
clibs ## libraries passed to the C/C++ compiler
|
clibs ## libraries passed to the C/C++ compiler
|
||||||
|
|
||||||
proc querySetting*(setting: SingleValueSetting): string {.
|
proc querySetting*(setting: SingleValueSetting): string {.
|
||||||
compileTime, noSideEffect.} = discard
|
compileTime, noSideEffect.} =
|
||||||
## Can be used to get a string compile-time option.
|
## Can be used to get a string compile-time option.
|
||||||
##
|
##
|
||||||
## See also:
|
## See also:
|
||||||
## * `compileOption <system.html#compileOption,string>`_ for `on|off` options
|
## * `compileOption <system.html#compileOption,string>`_ for `on|off` options
|
||||||
## * `compileOption <system.html#compileOption,string,string>`_ for enum options
|
## * `compileOption <system.html#compileOption,string,string>`_ for enum options
|
||||||
##
|
##
|
||||||
## Example:
|
runnableExamples:
|
||||||
##
|
const nimcache = querySetting(SingleValueSetting.nimcacheDir)
|
||||||
## .. code-block:: Nim
|
|
||||||
## const nimcache = querySetting(SingleValueSetting.nimcacheDir)
|
|
||||||
|
|
||||||
proc querySettingSeq*(setting: MultipleValueSetting): seq[string] {.
|
proc querySettingSeq*(setting: MultipleValueSetting): seq[string] {.
|
||||||
compileTime, noSideEffect.} = discard
|
compileTime, noSideEffect.} =
|
||||||
## Can be used to get a multi-string compile-time option.
|
## Can be used to get a multi-string compile-time option.
|
||||||
##
|
##
|
||||||
## See also:
|
## See also:
|
||||||
## * `compileOption <system.html#compileOption,string>`_ for `on|off` options
|
## * `compileOption <system.html#compileOption,string>`_ for `on|off` options
|
||||||
## * `compileOption <system.html#compileOption,string,string>`_ for enum options
|
## * `compileOption <system.html#compileOption,string,string>`_ for enum options
|
||||||
##
|
runnableExamples:
|
||||||
## Example:
|
const nimblePaths = querySettingSeq(MultipleValueSetting.nimblePaths)
|
||||||
##
|
|
||||||
## .. code-block:: Nim
|
|
||||||
## const nimblePaths = compileSettingSeq(MultipleValueSetting.nimblePaths)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue