Skip to content
Prev 207386 / 398506 Next

End of File for binary files

If you are using readBin and want to read binary (and not 'character')
data, then use 'raw' which will return a value if it encounters a
binary zero and not think it is the end of a character string.  It is
easy enough to setup a test file and try out a couple of the options
to see what happen.  Not enough information was presented in the
original posting to conclude what was really wanted.  Does the binary
file consist of just bytes, it is integer (32 or 64 bit), is it
floating point, etc.  Once you understand the structure of the data,
is it not difficult to read in the data.  Binary and 'character' are
not necessarily the same information when trying to read from a file.
On Sun, Jan 24, 2010 at 12:15 PM, Henrik Bengtsson <hb at stat.berkeley.edu> wrote: