MathGroup Archive 1998

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

Search the Archive

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


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11132] RE: [mg11077] Q:ReadList is reading spaces with numbers - what do I do?
  • From: "Barthelet, Luc" <lucb@ea.com>
  • Date: Mon, 23 Feb 1998 21:40:50 -0500

I just tried, copying the data you provided below. It worked. I got:
{{1,1,24496,1285,3310,31648,9203},{2,2,23598,1391,3230,31648,9123}} are
you sure you don't have tabs or other weird characters in the file? if
you want you can email me the file directly and I can try to reproduce
it.
(don't copy the file to mathgroup).

Luc.


>-----Original Message-----
>From:	Tony [SMTP:uctpjac@ucl.ac.uk]
To: mathgroup@smc.vnet.net
>Sent:	Wednesday, February 18, 1998 5:32 PM
>To:	mathgroup@smc.vnet.net
>Subject:	[mg11077] Q:ReadList is reading spaces with numbers - what do I do?
>
>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: Re: Question about Mathematica
  • Next by Date: Mathlink problem with lists of reals
  • Prev by thread: Re: Q:ReadList is reading spaces with numbers - what do I do?
  • Next by thread: Re: Tools/User set up