You are right. Duh. I forgot the implications of the second part of my answer
in the first one...
I still prefer the 0 ..< iterations as we usually iterate from zero with
non-inclusive upper bound in nim. If he changes the code at some point to use
that counter, my range will probably already
@miran: You sound like a Fortran spy ;)
> you made a mistake on the range
`1 .. iterations` is the same (and a bit cleaner, IMO) as `0 ..< iterations`
I concur that a for loop is much better, but you made a mistake on the range .
And as the i will not be used inside the loop, is only a loop counter, I prefer
to use the dummy variable _ instead to show that the value is being discarded.
import os
proc waitAndPrint(what:
Also you should probably use for loops in your specific example, just in case
you didn't know what they were
import os
proc waitAndPrint(what: string, iterations: int, millisecs: int) =
for i in 1..iterations:
stdout.write what
stdout.flushFile()
I'll format, and thanks.
Please format your code as described in the "Code Blocks" section
[here](https://forum.nim-lang.org/about/rst#code-blocks).
I think you just need to write `stdout.flushFile()` after your `stdout.write`.