[M3devel] random-acces I/O

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Fri Feb 29 23:41:26 CET 2008


I need to do direct-access I/O from a Modula 3 program with a file 
format that is externally specified.  It is necessary to both read and 
write in random fashion during a run of the program, prefereably without 
having to close or open the file each time.

I expect the answers to the following questions are "Yes", but I'd 
appreciate confirmation:

  ? If I have a File.T (obtained from FS.OpenFile) can I have both a 
    Rd.T and a Wr.T active on it simultaeously?

  ? Will things written using the Wr.T be immediately available 
    for reading with the Rd.T, with no buffereing problems?

  ? Are there methods for locking the file -- or portions of it --  
    against simutaneous access by other programs, including ones written 
    in other languages?

-- hendrik



More information about the M3devel mailing list