Sorry, it works correctly. But how to read it back? File contains several 
instances of MyType, so I need to take subpart of file. I've tried this 
    
    
    let data = readFile("/tmp/tmp.mytype")
    let ololo = cast[MyType](data[0 .. <sizeof(MyType)])
    

Is it correct way?

Reply via email to