History variables: Difference between revisions
Content added Content deleted
(Changed interface to "initHistoryVar".) |
|||
Line 1,535: | Line 1,535: | ||
hist: seq[T] |
hist: seq[T] |
||
ffunc initHistoryVar[T](value: T = T.default): HistoryVar[T] = |
|||
## Initialize a history variable with default value (binary zero). |
|||
result.hist.add T.default |
|||
func initHistoryVar[T](value: T): HistoryVar[T] = |
|||
## Initialize a history variable with given value. |
## Initialize a history variable with given value. |
||
result.hist.add value |
result.hist.add value |