Fix broken links in docs (#16336)

* Fix broken links in docs

* Fix rand HSlice links
This commit is contained in:
Elliot Waite 2020-12-14 11:13:12 -08:00 • committed by GitHub
commit f3d57761ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 126 additions and 120 deletions

View file

@ -235,7 +235,7 @@ template implementSetInheritable() {.dirty.} =
## Returns ``true`` on success.
##
## This procedure is not guaranteed to be available for all platforms.
## Test for availability with `declared()`_.
## Test for availability with `declared() <system.html#declared,untyped>`_.
fd.FileHandle.setInheritable(inheritable)
when defined(windows) or defined(nimdoc):

View file

@ -64,7 +64,7 @@ type
HashSet*[A] {.myShallow.} = object ## \
## A generic hash set.
##
## Use `init proc <#init,HashSet[A],int>`_ or `initHashSet proc <#initHashSet,int>`_
## Use `init proc <#init,HashSet[A]>`_ or `initHashSet proc <#initHashSet,int>`_
## before calling other procs on it.
data: KeyValuePairSeq[A]
counter: int
@ -76,8 +76,8 @@ type
OrderedSet*[A] {.myShallow.} = object ## \
## A generic hash set that remembers insertion order.
##
## Use `init proc <#init,OrderedSet[A],int>`_ or `initOrderedSet proc
## <#initOrderedSet,int>`_ before calling other procs on it.
## Use `init proc <#init,OrderedSet[A]>`_ or `initOrderedSet proc
## <#initOrderedSet>`_ before calling other procs on it.
data: OrderedKeyValuePairSeq[A]
counter, first, last: int
SomeSet*[A] = HashSet[A] | OrderedSet[A]
@ -104,7 +104,7 @@ proc init*[A](s: var HashSet[A], initialSize = defaultInitialSize) =
## existing values and calling `excl() <#excl,HashSet[A],A>`_ on them.
##
## See also:
## * `initHashSet proc <#initHashSet,int>`_
## * `initHashSet proc <#initHashSet>`_
## * `toHashSet proc <#toHashSet,openArray[A]>`_
runnableExamples:
var a: HashSet[int]
@ -113,7 +113,7 @@ proc init*[A](s: var HashSet[A], initialSize = defaultInitialSize) =
initImpl(s, initialSize)
proc initHashSet*[A](initialSize = defaultInitialSize): HashSet[A] =
## Wrapper around `init proc <#init,HashSet[A],int>`_ for initialization of
## Wrapper around `init proc <#init,HashSet[A]>`_ for initialization of
## hash sets.
##
## Returns an empty hash set you can assign directly in ``var`` blocks in a
@ -209,7 +209,7 @@ proc toHashSet*[A](keys: openArray[A]): HashSet[A] =
## Duplicates are removed.
##
## See also:
## * `initHashSet proc <#initHashSet,int>`_
## * `initHashSet proc <#initHashSet>`_
runnableExamples:
let
a = toHashSet([5, 3, 2])
@ -601,7 +601,7 @@ proc toSet*[A](keys: openArray[A]): HashSet[A] {.deprecated:
proc isValid*[A](s: HashSet[A]): bool {.deprecated:
"Deprecated since v0.20; sets are initialized by default".} =
## Returns `true` if the set has been initialized (with `initHashSet proc
## <#initHashSet,int>`_ or `init proc <#init,HashSet[A],int>`_).
## <#initHashSet>`_ or `init proc <#init,HashSet[A]>`_).
##
## **Examples:**
##
@ -640,7 +640,7 @@ proc init*[A](s: var OrderedSet[A], initialSize = defaultInitialSize) =
## existing values and calling `excl() <#excl,HashSet[A],A>`_ on them.
##
## See also:
## * `initOrderedSet proc <#initOrderedSet,int>`_
## * `initOrderedSet proc <#initOrderedSet>`_
## * `toOrderedSet proc <#toOrderedSet,openArray[A]>`_
runnableExamples:
var a: OrderedSet[int]
@ -649,7 +649,7 @@ proc init*[A](s: var OrderedSet[A], initialSize = defaultInitialSize) =
initImpl(s, initialSize)
proc initOrderedSet*[A](initialSize = defaultInitialSize): OrderedSet[A] =
## Wrapper around `init proc <#init,OrderedSet[A],int>`_ for initialization of
## Wrapper around `init proc <#init,OrderedSet[A]>`_ for initialization of
## ordered hash sets.
##
## Returns an empty ordered hash set you can assign directly in ``var`` blocks
@ -674,7 +674,7 @@ proc toOrderedSet*[A](keys: openArray[A]): OrderedSet[A] =
## Duplicates are removed.
##
## See also:
## * `initOrderedSet proc <#initOrderedSet,int>`_
## * `initOrderedSet proc <#initOrderedSet>`_
runnableExamples:
let
a = toOrderedSet([5, 3, 2])

View file

@ -135,7 +135,7 @@
##
## The same could have been achieved by manually iterating over a container
## and increasing each key's value with `inc proc
## <#inc,CountTable[A],A,Positive>`_:
## <#inc,CountTable[A],A,int>`_:
##
## .. code-block::
## import tables
@ -230,13 +230,13 @@ type
## `data` and `counter` are internal implementation details which
## can't be accessed.
##
## For creating an empty Table, use `initTable proc<#initTable,int>`_.
## For creating an empty Table, use `initTable proc<#initTable>`_.
data: KeyValuePairSeq[A, B]
counter: int
TableRef*[A, B] = ref Table[A, B] ## Ref version of `Table<#Table>`_.
##
## For creating a new empty TableRef, use `newTable proc
## <#newTable,int>`_.
## <#newTable>`_.
const
defaultInitialSize* = 32
@ -293,7 +293,7 @@ proc initTable*[A, B](initialSize = defaultInitialSize): Table[A, B] =
##
## See also:
## * `toTable proc<#toTable,openArray[]>`_
## * `newTable proc<#newTable,int>`_ for creating a `TableRef`
## * `newTable proc<#newTable>`_ for creating a `TableRef`
runnableExamples:
let
a = initTable[int, string]()
@ -322,7 +322,7 @@ proc toTable*[A, B](pairs: openArray[(A, B)]): Table[A, B] =
## ``pairs`` is a container consisting of ``(key, value)`` tuples.
##
## See also:
## * `initTable proc<#initTable,int>`_
## * `initTable proc<#initTable>`_
## * `newTable proc<#newTable,openArray[]>`_ for a `TableRef` version
runnableExamples:
let a = [('a', 5), ('b', 9)]
@ -771,7 +771,7 @@ iterator allValues*[A, B](t: Table[A, B]; key: A): B {.deprecated:
## Iterates over any value in the table ``t`` that belongs to the given ``key``.
##
## Used if you have a table with duplicate keys (as a result of using
## `add proc<#add,Table[A,B],A,B>`_).
## `add proc<#add,Table[A,B],A,sinkB>`_).
##
runnableExamples:
import sequtils, algorithm
@ -801,7 +801,7 @@ proc newTable*[A, B](initialSize = defaultInitialSize): <//>TableRef[A, B] =
## See also:
## * `newTable proc<#newTable,openArray[]>`_ for creating a `TableRef`
## from a collection of `(key, value)` pairs
## * `initTable proc<#initTable,int>`_ for creating a `Table`
## * `initTable proc<#initTable>`_ for creating a `Table`
runnableExamples:
let
a = newTable[int, string]()
@ -816,7 +816,7 @@ proc newTable*[A, B](pairs: openArray[(A, B)]): <//>TableRef[A, B] =
## ``pairs`` is a container consisting of ``(key, value)`` tuples.
##
## See also:
## * `newTable proc<#newTable,int>`_
## * `newTable proc<#newTable>`_
## * `toTable proc<#toTable,openArray[]>`_ for a `Table` version
runnableExamples:
let a = [('a', 5), ('b', 9)]
@ -845,7 +845,7 @@ proc `[]`*[A, B](t: TableRef[A, B], key: A): var B =
## a default value (e.g. zero for int) if the key doesn't exist
## * `getOrDefault proc<#getOrDefault,TableRef[A,B],A,B>`_ to return
## a custom value if the key doesn't exist
## * `[]= proc<#[]=,TableRef[A,B],A,B>`_ for inserting a new
## * `[]= proc<#[]=,TableRef[A,B],A,sinkB>`_ for inserting a new
## (key, value) pair in the table
## * `hasKey proc<#hasKey,TableRef[A,B],A>`_ for checking if a key is in
## the table
@ -1008,7 +1008,7 @@ proc add*[A, B](t: TableRef[A, B], key: A, val: sink B) {.deprecated:
##
## **This can introduce duplicate keys into the table!**
##
## Use `[]= proc<#[]=,TableRef[A,B],A,B>`_ for inserting a new
## Use `[]= proc<#[]=,TableRef[A,B],A,sinkB>`_ for inserting a new
## (key, value) pair in the table without introducing duplicates.
t[].add(key, val)
@ -1228,14 +1228,14 @@ type
## Hash table that remembers insertion order.
##
## For creating an empty OrderedTable, use `initOrderedTable proc
## <#initOrderedTable,int>`_.
## <#initOrderedTable>`_.
data: OrderedKeyValuePairSeq[A, B]
counter, first, last: int
OrderedTableRef*[A, B] = ref OrderedTable[A, B] ## Ref version of
## `OrderedTable<#OrderedTable>`_.
##
## For creating a new empty OrderedTableRef, use `newOrderedTable proc
## <#newOrderedTable,int>`_.
## <#newOrderedTable>`_.
# ------------------------------ helpers ---------------------------------
@ -1294,7 +1294,7 @@ proc initOrderedTable*[A, B](initialSize = defaultInitialSize): OrderedTable[A,
##
## See also:
## * `toOrderedTable proc<#toOrderedTable,openArray[]>`_
## * `newOrderedTable proc<#newOrderedTable,int>`_ for creating an
## * `newOrderedTable proc<#newOrderedTable>`_ for creating an
## `OrderedTableRef`
runnableExamples:
let
@ -1324,7 +1324,7 @@ proc toOrderedTable*[A, B](pairs: openArray[(A, B)]): OrderedTable[A, B] =
## ``pairs`` is a container consisting of ``(key, value)`` tuples.
##
## See also:
## * `initOrderedTable proc<#initOrderedTable,int>`_
## * `initOrderedTable proc<#initOrderedTable>`_
## * `newOrderedTable proc<#newOrderedTable,openArray[]>`_ for an
## `OrderedTableRef` version
runnableExamples:
@ -1347,7 +1347,7 @@ proc `[]`*[A, B](t: OrderedTable[A, B], key: A): B =
## a default value (e.g. zero for int) if the key doesn't exist
## * `getOrDefault proc<#getOrDefault,OrderedTable[A,B],A,B>`_ to return
## a custom value if the key doesn't exist
## * `[]= proc<#[]=,OrderedTable[A,B],A,B>`_ for inserting a new
## * `[]= proc<#[]=,OrderedTable[A,B],A,sinkB>`_ for inserting a new
## (key, value) pair in the table
## * `hasKey proc<#hasKey,OrderedTable[A,B],A>`_ for checking if a
## key is in the table
@ -1369,7 +1369,7 @@ proc `[]`*[A, B](t: var OrderedTable[A, B], key: A): var B =
## a default value (e.g. zero for int) if the key doesn't exist
## * `getOrDefault proc<#getOrDefault,OrderedTable[A,B],A,B>`_ to return
## a custom value if the key doesn't exist
## * `[]= proc<#[]=,OrderedTable[A,B],A,B>`_ for inserting a new
## * `[]= proc<#[]=,OrderedTable[A,B],A,sinkB>`_ for inserting a new
## (key, value) pair in the table
## * `hasKey proc<#hasKey,OrderedTable[A,B],A>`_ for checking if a
## key is in the table
@ -1495,7 +1495,7 @@ proc add*[A, B](t: var OrderedTable[A, B], key: A, val: sink B) {.deprecated:
##
## **This can introduce duplicate keys into the table!**
##
## Use `[]= proc<#[]=,OrderedTable[A,B],A,B>`_ for inserting a new
## Use `[]= proc<#[]=,OrderedTable[A,B],A,sinkB>`_ for inserting a new
## (key, value) pair in the table without introducing duplicates.
addImpl(enlarge)
@ -1796,7 +1796,7 @@ proc newOrderedTable*[A, B](initialSize = defaultInitialSize): <//>OrderedTableR
## See also:
## * `newOrderedTable proc<#newOrderedTable,openArray[]>`_ for creating
## an `OrderedTableRef` from a collection of `(key, value)` pairs
## * `initOrderedTable proc<#initOrderedTable,int>`_ for creating an
## * `initOrderedTable proc<#initOrderedTable>`_ for creating an
## `OrderedTable`
runnableExamples:
let
@ -1811,7 +1811,7 @@ proc newOrderedTable*[A, B](pairs: openArray[(A, B)]): <//>OrderedTableRef[A, B]
## ``pairs`` is a container consisting of ``(key, value)`` tuples.
##
## See also:
## * `newOrderedTable proc<#newOrderedTable,int>`_
## * `newOrderedTable proc<#newOrderedTable>`_
## * `toOrderedTable proc<#toOrderedTable,openArray[]>`_ for an
## `OrderedTable` version
runnableExamples:
@ -1835,7 +1835,7 @@ proc `[]`*[A, B](t: OrderedTableRef[A, B], key: A): var B =
## a default value (e.g. zero for int) if the key doesn't exist
## * `getOrDefault proc<#getOrDefault,OrderedTableRef[A,B],A,B>`_ to return
## a custom value if the key doesn't exist
## * `[]= proc<#[]=,OrderedTableRef[A,B],A,B>`_ for inserting a new
## * `[]= proc<#[]=,OrderedTableRef[A,B],A,sinkB>`_ for inserting a new
## (key, value) pair in the table
## * `hasKey proc<#hasKey,OrderedTableRef[A,B],A>`_ for checking if
## a key is in the table
@ -1981,7 +1981,7 @@ proc add*[A, B](t: OrderedTableRef[A, B], key: A, val: sink B) {.deprecated:
##
## **This can introduce duplicate keys into the table!**
##
## Use `[]= proc<#[]=,OrderedTableRef[A,B],A,B>`_ for inserting a new
## Use `[]= proc<#[]=,OrderedTableRef[A,B],A,sinkB>`_ for inserting a new
## (key, value) pair in the table without introducing duplicates.
t[].add(key, val)
@ -2208,7 +2208,7 @@ type
## Hash table that counts the number of each key.
##
## For creating an empty CountTable, use `initCountTable proc
## <#initCountTable,int>`_.
## <#initCountTable>`_.
data: seq[tuple[key: A, val: int]]
counter: int
isSorted: bool
@ -2216,7 +2216,7 @@ type
## `CountTable<#CountTable>`_.
##
## For creating a new empty CountTableRef, use `newCountTable proc
## <#newCountTable,int>`_.
## <#newCountTable>`_.
# ------------------------------ helpers ---------------------------------
@ -2260,7 +2260,7 @@ proc initCountTable*[A](initialSize = defaultInitialSize): CountTable[A] =
##
## See also:
## * `toCountTable proc<#toCountTable,openArray[A]>`_
## * `newCountTable proc<#newCountTable,int>`_ for creating a
## * `newCountTable proc<#newCountTable>`_ for creating a
## `CountTableRef`
initImpl(result, initialSize)
@ -2294,7 +2294,7 @@ proc `[]=`*[A](t: var CountTable[A], key: A, val: int) =
##
## See also:
## * `[] proc<#[],CountTable[A],A>`_ for retrieving a value of a key
## * `inc proc<#inc,CountTable[A],A,Positive>`_ for incrementing a
## * `inc proc<#inc,CountTable[A],A,int>`_ for incrementing a
## value of a key
assert(not t.isSorted, "CountTable must not be used after sorting")
assert val >= 0
@ -2617,7 +2617,7 @@ proc newCountTable*[A](initialSize = defaultInitialSize): <//>CountTableRef[A] =
## See also:
## * `newCountTable proc<#newCountTable,openArray[A]>`_ for creating
## a `CountTableRef` from a collection
## * `initCountTable proc<#initCountTable,int>`_ for creating a
## * `initCountTable proc<#initCountTable>`_ for creating a
## `CountTable`
new(result)
result[] = initCountTable[A](initialSize)
@ -2635,7 +2635,7 @@ proc `[]`*[A](t: CountTableRef[A], key: A): int =
## See also:
## * `getOrDefault<#getOrDefault,CountTableRef[A],A,int>`_ to return
## a custom value if the key doesn't exist
## * `inc proc<#inc,CountTableRef[A],A>`_ to inc even if missing
## * `inc proc<#inc,CountTableRef[A],A,int>`_ to inc even if missing
## * `[]= proc<#[]%3D,CountTableRef[A],A,int>`_ for inserting a new
## (key, value) pair in the table
## * `hasKey proc<#hasKey,CountTableRef[A],A>`_ for checking if a key

View file

@ -468,7 +468,7 @@ template spawnX*(call) =
## Spawns a new task if a CPU core is ready, otherwise executes the
## call in the calling thread.
##
## Usually it is advised to use `spawn proc <#spawn,typed>`_ in order to
## Usually it is advised to use `spawn proc <#spawn,sinktyped>`_ in order to
## not block the producer for an unknown amount of time.
##
## ``call`` has to be proc call ``p(...)`` where ``p`` is gcsafe and has a

View file

@ -129,7 +129,7 @@
## A set of directories and files from the `ssl_certs <ssl_certs.html>`_
## module are scanned to locate CA certificates.
##
## See `newContext <net.html#newContext>`_ to tweak or disable certificate validation.
## See `newContext <net.html#newContext.string,string,string,string>`_ to tweak or disable certificate validation.
##
## Timeouts
## ========
@ -565,7 +565,7 @@ proc newHttpClient*(userAgent = defUserAgent, maxRedirects = 5,
## default is 5.
##
## ``sslContext`` specifies the SSL context to use for HTTPS requests.
## See `SSL/TLS support <##ssl-tls-support>`_
## See `SSL/TLS support <#sslslashtls-support>`_
##
## ``proxy`` specifies an HTTP proxy to use for this HTTP client's
## connections.

View file

@ -246,7 +246,7 @@ when not defined(js):
## rotation.
##
## Create a new ``RollingFileLogger`` with the `newRollingFileLogger proc
## <#newRollingFileLogger,FileMode,int,int>`_.
## <#newRollingFileLogger,FileMode,Positive,int>`_.
##
## **Note:** This logger is not available for the JavaScript backend.
##
@ -395,7 +395,7 @@ proc newConsoleLogger*(levelThreshold = lvlAll, fmtStr = defaultFmtStr,
## * `newFileLogger proc<#newFileLogger,File>`_ that uses a file handle
## * `newFileLogger proc<#newFileLogger,FileMode,int>`_
## that accepts a filename
## * `newRollingFileLogger proc<#newRollingFileLogger,FileMode,int,int>`_
## * `newRollingFileLogger proc<#newRollingFileLogger,FileMode,Positive,int>`_
##
## **Examples:**
##
@ -460,7 +460,7 @@ when not defined(js):
## * `newConsoleLogger proc<#newConsoleLogger>`_
## * `newFileLogger proc<#newFileLogger,FileMode,int>`_
## that accepts a filename
## * `newRollingFileLogger proc<#newRollingFileLogger,FileMode,int,int>`_
## * `newRollingFileLogger proc<#newRollingFileLogger,FileMode,Positive,int>`_
##
## **Examples:**
##
@ -496,7 +496,7 @@ when not defined(js):
## See also:
## * `newConsoleLogger proc<#newConsoleLogger>`_
## * `newFileLogger proc<#newFileLogger,File>`_ that uses a file handle
## * `newRollingFileLogger proc<#newRollingFileLogger,FileMode,int,int>`_
## * `newRollingFileLogger proc<#newRollingFileLogger,FileMode,Positive,int>`_
##
## **Examples:**
##

View file

@ -21,7 +21,7 @@
##
## In order to use the SSL procedures defined in this module, you will need to
## compile your application with the ``-d:ssl`` flag. See the
## `newContext<net.html#newContext%2Cstring%2Cstring%2Cstring%2Cstring%2Cstring>`_
## `newContext<net.html#newContext%2Cstring%2Cstring%2Cstring%2Cstring>`_
## procedure for additional details.
##
## Examples

View file

@ -106,7 +106,7 @@ proc execCmd*(command: string): int {.rtl, extern: "nosp$1",
## This operation is also often called `system`:idx:.
##
## See also:
## * `execCmdEx proc <#execCmdEx,string,set[ProcessOption]>`_
## * `execCmdEx proc <#execCmdEx,string,set[ProcessOption],StringTableRef,string,string>`_
## * `startProcess proc
## <#startProcess,string,string,openArray[string],StringTableRef,set[ProcessOption]>`_
## * `execProcess proc

View file

@ -11,7 +11,7 @@
##
## Its implementation is based on the ``xoroshiro128+``
## (xor/rotate/shift/rotate) library.
## * More information: http://xoroshiro.di.unimi.it/
## * More information: http://xoroshiro.di.unimi.it
## * C implementation: http://xoroshiro.di.unimi.it/xoroshiro128plus.c
##
## **Do not use this module for cryptographic purposes!**
@ -135,7 +135,8 @@ proc next*(r: var Rand): uint64 =
## * `rand proc<#rand,Rand,Natural>`_ that returns an integer between zero and
## a given upper bound
## * `rand proc<#rand,Rand,range[]>`_ that returns a float
## * `rand proc<#rand,Rand,HSlice[T,T]>`_ that accepts a slice
## * `rand proc<#rand,Rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice
## * `rand proc<#rand,typedesc[T]>`_ that accepts an integer or range type
## * `skipRandomNumbers proc<#skipRandomNumbers,Rand>`_
runnableExamples:
@ -220,7 +221,8 @@ proc rand*(r: var Rand; max: Natural): int {.benign.} =
## * `rand proc<#rand,int>`_ that returns an integer using the default
## random number generator
## * `rand proc<#rand,Rand,range[]>`_ that returns a float
## * `rand proc<#rand,Rand,HSlice[T,T]>`_ that accepts a slice
## * `rand proc<#rand,Rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice
## * `rand proc<#rand,typedesc[T]>`_ that accepts an integer or range type
runnableExamples:
var r = initRand(123)
@ -246,7 +248,8 @@ proc rand*(max: int): int {.benign.} =
## * `rand proc<#rand,Rand,Natural>`_ that returns an integer using a
## provided state
## * `rand proc<#rand,float>`_ that returns a float
## * `rand proc<#rand,HSlice[T,T]>`_ that accepts a slice
## * `rand proc<#rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice
## * `rand proc<#rand,typedesc[T]>`_ that accepts an integer or range type
runnableExamples:
randomize(123)
@ -263,7 +266,8 @@ proc rand*(r: var Rand; max: range[0.0 .. high(float)]): float {.benign.} =
## * `rand proc<#rand,float>`_ that returns a float using the default
## random number generator
## * `rand proc<#rand,Rand,Natural>`_ that returns an integer
## * `rand proc<#rand,Rand,HSlice[T,T]>`_ that accepts a slice
## * `rand proc<#rand,Rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice
## * `rand proc<#rand,typedesc[T]>`_ that accepts an integer or range type
runnableExamples:
var r = initRand(234)
@ -289,7 +293,8 @@ proc rand*(max: float): float {.benign.} =
## * `rand proc<#rand,Rand,range[]>`_ that returns a float using a
## provided state
## * `rand proc<#rand,int>`_ that returns an integer
## * `rand proc<#rand,HSlice[T,T]>`_ that accepts a slice
## * `rand proc<#rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice
## * `rand proc<#rand,typedesc[T]>`_ that accepts an integer or range type
runnableExamples:
randomize(234)
@ -304,8 +309,8 @@ proc rand*[T: Ordinal or SomeFloat](r: var Rand; x: HSlice[T, T]): T =
## Allowed types for `T` are integers, floats, and enums without holes.
##
## See also:
## * `rand proc<#rand,HSlice[T,T]>`_ that accepts a slice and uses the
## default random number generator
## * `rand proc<#rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice and uses the default random number generator
## * `rand proc<#rand,Rand,Natural>`_ that returns an integer
## * `rand proc<#rand,Rand,range[]>`_ that returns a float
## * `rand proc<#rand,typedesc[T]>`_ that accepts an integer or range type
@ -333,8 +338,8 @@ proc rand*[T: Ordinal or SomeFloat](x: HSlice[T, T]): T =
## thread-safe.
##
## See also:
## * `rand proc<#rand,Rand,HSlice[T,T]>`_ that accepts a slice and uses
## a provided state
## * `rand proc<#rand,Rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice and uses a provided state
## * `rand proc<#rand,int>`_ that returns an integer
## * `rand proc<#rand,float>`_ that returns a floating point number
## * `rand proc<#rand,typedesc[T]>`_ that accepts an integer or range type
@ -357,7 +362,8 @@ proc rand*[T: SomeInteger](t: typedesc[T]): T =
## See also:
## * `rand proc<#rand,int>`_ that returns an integer
## * `rand proc<#rand,float>`_ that returns a floating point number
## * `rand proc<#rand,HSlice[T,T]>`_ that accepts a slice
## * `rand proc<#rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_
## that accepts a slice
runnableExamples:
randomize(567)
doAssert rand(int8) == 55

View file

@ -99,7 +99,7 @@ proc debugRecv*(smtp: Smtp | AsyncSmtp): Future[TaintedString] {.multisync.} =
## this is if you are implementing any
## `SMTP extensions<https://en.wikipedia.org/wiki/Extended_SMTP>`_.
##
## See `checkReply(reply)<#checkReply,,string>`_.
## See `checkReply(reply)<#checkReply,AsyncSmtp,string>`_.
result = await smtp.sock.recvLine()
if smtp.debug:
@ -211,7 +211,7 @@ proc quitExcpt(smtp: AsyncSmtp, msg: string): Future[void] =
return retFuture
proc checkReply*(smtp: Smtp | AsyncSmtp, reply: string) {.multisync.} =
## Calls `debugRecv<#debugRecv>`_ and checks that the received
## Calls `debugRecv<#debugRecv,AsyncSmtp>`_ and checks that the received
## data starts with ``reply``. If the received data does not start
## with ``reply``, then a ``QUIT`` command will be sent to the SMTP
## server and a ``ReplyError`` exception will be raised.

View file

@ -813,7 +813,7 @@ proc toRunes*(s: string): seq[Rune] =
## Obtains a sequence containing the Runes in ``s``.
##
## See also:
## * `$ proc <#$,seq[T][Rune]>`_ for a reverse operation
## * `$ proc <#$,Rune>`_ for a reverse operation
runnableExamples:
let a = toRunes("aáä")
doAssert a == @["a".runeAt(0), "á".runeAt(0), "ä".runeAt(0)]