MathGroup Archive 1998

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

Search the Archive

Q:ReadList is reading spaces with numbers - what do I do?


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11077] Q:ReadList is reading spaces with numbers - what do I do?
  • From: Tony <uctpjac@ucl.ac.uk>
  • Date: Wed, 18 Feb 1998 20:32:28 -0500
  • Organization: University College London

Hello, and sorry for a very "un-Mathematica" like post. I'm just having
a problem with Mathematica's file reading capabiliites that I've not
had in the past.

I am running Mathematica 3.0 for Linux.

When I define:

myres = ReadList[
    "dsbok.ton",{Number, Number, Number, Number, Number, Number,
Number}]

I get:

{{ , ,24496  ,1285  ,3310  ,31648  ,9203  },{2  ,2  ,
    23598  ,1391  ,3230  ,31648  ,9123  }, ....etc ....

}

wheilst in fact, the top of "dsbok.ton" has:
     1  1  24496   1285  3310  31648  9203
     2  2  23598   1391  3230  31648  9123 In other words, ReadList is
skipping the first 2 1's, and not taking the space as a word-separator.

I have tried:
Reading words rather than Numbers;
Using WordSeparator -> {" ","\t"};
Reading another file.

None of these has worked. the _really_ frustrating thing is that I think
that this procedure worked a month ago on just the same bits of data!
Has anyone run into and solved this problem?

Tony



  • Prev by Date: Computing my own function efficiently
  • Next by Date: Re: sort and find in MATHEMATICA like in MATLAB
  • Prev by thread: Re: Computing my own function efficiently
  • Next by thread: Re: Q:ReadList is reading spaces with numbers - what do I do?