RosettaCodeData/Task/Undefined-values/Nim/undefined-values.nim

6 lines
181 B
Nim
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
var a {.noInit.}: array[1_000_000, int]
# For a proc, {.noInit.} means that the result is not initialized.
proc p(): array[1000, int] {.noInit.} =
for i in 0..999: result[i] = i