Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Problem with ReadList[]
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
hamusk@uncc.edu

Posts: 2
Registered: 12/7/04
Problem with ReadList[]
Posted: Nov 9, 1996 2:00 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

When reading in data from a file like this;

data=ReadList["data",Table[Byte,{100}]];

to create a 100x100 array (from a 10000 byte long file), I find that if
Mathematica encounters the value 26 (0x1A) it chokes and treats the value 26
and all values after it as 'End of File' . Also there is a problem in that it
seems to sometimes add bytes that do not exist in the file. For instance once
this happened: I loaded a file and did

?data

I got back

104 98 29 53 5 53 90 97 5 57 27

When I looked directly (hex editor) at the data, the first row of bytes was

104 98 29 53 90 97 5 57 27

Very strange!

For some reason, Mathematica added the values 5 and 53. I imagine that there
is some sort of character translation going on but I cannot find anything
about it in the documentation or on the Wolfram Research website. Also it
would seem strange that it would be doing some sort of character
translation, but who knows? I am running Mathhematica 2.2.1 for Students on
Windows 95 (4.00.950). I do not encounter this problem on Solaris.

Can anyone help? Is there a FAQ?

Andy Musk







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.