use [atEnd](https://nim-lang.org/docs/streams.html#atEnd%2CStream) to check 
whether it's ended or not and use 
[getPosition](https://nim-lang.org/docs/streams.html#getPosition%2CStream) for 
its current position.
    
    
    import os, streams
    
    var fs = newFileStream(paramStr(1), fmRead)
    
    while not fs.atEnd:
      var one_char = fs.readChar()
      echo one_char
    
    
    Run

Reply via email to