Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

binary file i/o

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4625] binary file i/o
  • From: William Weglinski <willwb19 at mail.idt.net>
  • Date: Wed, 21 Aug 1996 03:25:40 -0400
  • Organization: IDT Corporation
  • Sender: owner-wri-mathgroup at wolfram.com

I am having difficulty reading and writing binary files correctly, With Mathematica 2.2 
for Windows on my PC.  The first problem is that if a file contains the byte: 1A (i.e. 
hexadecimal 26), it is interpreted as EndOfFile, and I can't figure out any way to force 
Mathematica to read any more bytes after that.  The second problem is trying to write 
the byte 0A (i.e. hexadecimal 10 -- a.k.a. linefeed ) to a file.  Instead of writing 
just the byte: 0A, the bytes: 0D0A are outputted (carriage return+linefeed).  Again, I 
can't find any way to override this behavior.  The standard Mathematica package: 
Utilities`BinaryFiles` was of no help to me, nor could I make it work using the 
WriteString[] command directly. Setting the StringConversion option on the outputstream 
didn't work either.  Has anyone else encountered this problem, and what can be done to 
work around it?

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Converting to PICT within an MMA program
  • Next by Date: Mma: 13 is not prime!
  • Previous by thread: Converting to PICT within an MMA program
  • Next by thread: Re: binary file i/o