system.nim: fix doc comment for 'once'
This commit is contained in:
parent
7f55bfc7d5
commit
b5730ec01f
1 changed files with 6 additions and 6 deletions
|
|
@ -4127,13 +4127,13 @@ template once*(body: untyped): untyped =
|
|||
## re-executed on each module reload.
|
||||
##
|
||||
## .. code-block:: nim
|
||||
## proc draw(t: Triangle) =
|
||||
## once:
|
||||
## graphicsInit()
|
||||
##
|
||||
## line(t.p1, t.p2)
|
||||
## line(t.p2, t.p3)
|
||||
## line(t.p3, t.p1)
|
||||
## proc draw(t: Triangle) =
|
||||
## once:
|
||||
## graphicsInit()
|
||||
## line(t.p1, t.p2)
|
||||
## line(t.p2, t.p3)
|
||||
## line(t.p3, t.p1)
|
||||
##
|
||||
var alreadyExecuted {.global.} = false
|
||||
if not alreadyExecuted:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue