system.nim: fix doc comment for 'once'

This commit is contained in:
Andreas Rumpf
2018-09-05 18:05:55 +02:00
committed by Araq
parent 7f55bfc7d5
commit b5730ec01f

View File

@@ -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: