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: string, iterations: int, millisecs: int) =
      for _ in 0 ..< iterations:
        stdout.write what
        stdout.flushFile()
        sleep(millisecs)
    
    Run

Reply via email to