On Thu, 17 Jul 2014 20:35:24 +0000, seany wrote: > Hello, > > What are the methods of unformatted binary IO in d? File.write seems to > use formatted ASCII . I would like to write a binary file that I cna > read in fortan. Similarly, I would like to write a file in Fortan, > unformatted IO, and read it using D.
You have a few options: * The old std.stream -- this module is due for replacement, hopefully ASAP. * Use File.rawRead/rawWrite. These are intended for arrays, though they can be used to read single values. * Work with chunks of ubyte data and use std.bitmanip's read and write functions. The last option is probably your best option for producing good future- proof, idiomatic D code.