Well, it is not that difficult: Search in module system for fmReadWrite and you 
will see
    
    
    fmReadWrite,                ## Open the file for read and write access.
                  ## If the file does not exist, it will be
                  ## created. Existing files will be cleared!
    
    
    Run

So file is erased at startup! I guess this behaviour is not Nim specific, I may 
have seen it in other languages, it may be related to OS. Well, may be not that 
easy to detect for people without some experience and a will to discover 
unexpected result on their own.

Reply via email to