Back to Nim

subdir/subdir_b/utils

nimdoc/testproject/expected/subdir/subdir_b/utils.html

2.2.1010.0 KB
Original Source

This is a description of the utils module.

Links work:

This is now a header

Next header

And so on

More headers

Up to level 6
  1. An enumeration
  2. Second idea here.

More text.

  1. Other case value
  2. Second case.

Ref group fn2 or specific function like fn2() or fn2( int ) or fn2(int, float).

Ref generics like this: binarySearch or binarySearch(openArray[T], K, proc (T, K)) or proc binarySearch(openArray[T], K, proc (T, K)) or in different style: proc binarysearch(openarray[T], K, proc(T, K)). Can be combined with export symbols and type parameters: binarysearch*[T, K](openArray[T], K, proc (T, K)). With spaces binary search.

Note that proc can be used in postfix form: binarySearch proc.

Ref. type like G and type G and G[T] and type G*[T].

Group ref. with capital letters works: fN11 or fn11

Ref. [] is the same as proc [](G[T]) because there are no overloads. The full form: proc []*[T](x: G[T]): TRef. []= aka []=(G[T], int, T).Ref. $ aka proc $ or proc $.Ref. $(a: ref SomeType).Ref. foo_bar aka iterator foo_bar_.Ref. fnT; U,V: SomeFloat.Ref. 'big or func 'big or 'big(string).

Pandoc Markdown

Now repeat all the auto links of above in Pandoc Markdown Syntax.

Ref group fn2 or specific function like fn2() or fn2( int ) or fn2(int, float).

Ref generics like this: binarySearch or binarySearch(openArray[T], K, proc (T, K)) or proc binarySearch(openArray[T], K, proc (T, K)) or in different style: proc binarysearch(openarray[T], K, proc(T, K)). Can be combined with export symbols and type parameters: binarysearch*[T, K](openArray[T], K, proc (T, K)). With spaces binary search.

Note that proc can be used in postfix form: binarySearch proc.

Ref. type like G and type G and G[T] and type G*[T].

Group ref. with capital letters works: fN11 or fn11

Ref. [] is the same as proc [](G[T]) because there are no overloads. The full form: proc []*[T](x: G[T]): T Ref. []= aka []=(G[T], int, T). Ref. $ aka proc $ or proc $. Ref. $(a: ref SomeType). Ref. foo_bar aka iterator foo_bar_. Ref. fnT; U,V: SomeFloat. Ref. 'big or func 'big or 'big(string).

Pandoc Markdown has synax for changing text of links: Ref. this proc or another symbol.

Symbols documentation

Let us repeat auto links from symbols section below:

There is also variant f(G[string]). See also f(G[int]).

Types

[G](#G)[T]=object
[SomeType](#SomeType)=enumenumValueA,enumValueB,enumValueC

Procs

proc[`$`](#%24%2CG%5BT%5D)[T](a:[G](#G)[T]):string
proc[`$`](#%24%2Cref.SomeType)[T](a:ref[SomeType](#SomeType)):string
func[`'big`](#%27big%2Cstring)(a:string):[SomeType](#SomeType){....raises: [], tags: [], forbids: [].}
proc[`[]`](#%5B%5D%2CG%5BT%5D)[T](x:[G](#G)[T]):T
proc[`[]=`](#%5B%5D%3D%2CG%5BT%5D%2Cint%2CT)[T](a:var[G](#G)[T];index:int;value:T)
proc[binarySearch](#binarySearch%2CopenArray%5BT%5D%2CK%2Cproc%28T%2CK%29)[T,K](a:openArray[T];key:K;cmp:proc(x:T;y:K):int{.closure.}):int
proc[f](#f%2CG%5Bint%5D)(x:[G](#G)[int]){....raises: [], tags: [], forbids: [].}

There is also variant f(G[string])

proc[f](#f%2CG%5Bstring%5D)(x:[G](#G)[string]){....raises: [], tags: [], forbids: [].}

See also f(G[int]).

proc[fn](#fn)T;U,V:SomeFloat
proc[fn2](#fn2)(){....raises: [], tags: [], forbids: [].}

comment

proc[fn2](#fn2%2Cint)(x:int){....raises: [], tags: [], forbids: [].}

fn2 comment

proc[fn2](#fn2%2Cint%2Cfloat)(x:int;y:float){....raises: [], tags: [], forbids: [].}
proc[fn2](#fn2%2Cint%2Cfloat%2Cfloat)(x:int;y:float;z:float){....raises: [], tags: [], forbids: [].}
proc[fn3](#fn3)():auto{....raises: [], tags: [], forbids: [].}

comment

proc[fn4](#fn4)():auto{....raises: [], tags: [], forbids: [].}

comment

proc[fn5](#fn5)(){....raises: [], tags: [], forbids: [].}

comment

proc[fn6](#fn6)(){....raises: [], tags: [], forbids: [].}

comment

proc[fn7](#fn7)(){....raises: [], tags: [], forbids: [].}

comment

proc[fn8](#fn8)():auto{....raises: [], tags: [], forbids: [].}

comment

func[fn9](#fn9%2Cint)(a:int):int{....raises: [], tags: [], forbids: [].}

comment

func[fn10](#fn10%2Cint)(a:int):int{....raises: [], tags: [], forbids: [].}

comment

func[fN11](#fN11)(){....raises: [], tags: [], forbids: [].}
func[fN11](#fN11%2Cint)(x:int){....raises: [], tags: [], forbids: [].}
proc[funWithGenerics](#funWithGenerics%2CT%2CU)[T,U:SomeFloat](a:T;b:U)
proc[someType](#someType_2)():[SomeType](#SomeType){....raises: [], tags: [], forbids: [].}

constructor.

Iterators

iterator[fooBar](#fooBar.i%2Cseq%5BSomeType%5D)(a:seq[[SomeType](#SomeType)]):int{....raises: [], tags: [], forbids: [].}

Templates

template[aEnum](#aEnum.t)():untyped
template[bEnum](#bEnum.t)():untyped
template[fromUtilsGen](#fromUtilsGen.t)():untyped

should be shown in utils.html only

Example:

discard"should be in utils.html only, not in module that calls fromUtilsGen"

ditto