MathGroup Archive 1996

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

Search the Archive

Re: ReadList Expression: (Q)

  • To: mathgroup at
  • Subject: [mg3708] Re: ReadList Expression: (Q)
  • From: wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner)
  • Date: Wed, 10 Apr 1996 02:11:33 -0400
  • Organization: University of Colorado, Boulder
  • Sender: owner-wri-mathgroup at

In article <4ka4vs$sai at>,
m. r. schaferkotter <schaferk at> wrote:
>HDF files will output Inf for very large values.
>my data file looks like:
>-.022 .033
>Inf   -Inf
>How can one read this into Mma? 

    ToExpression /@ ReadList[Word] should do it.

If you want maintain the structure of the file, the easiest thing to do
is use Partition after you've finished reading.   If the file may have
a different number of entries on each line, then you can't afford to lost
the structure in the first place.  In that case you can do this:

    Map[ToExpression, ReadList[Word, RecordLists->True], {2}]

		Dave Wagner
		Principia Consulting
		(303) 786-8371
		dbwagner at


  • Prev by Date: Re: argument names
  • Next by Date: MathLink and C++ (can mathlink handle C++?)
  • Previous by thread: ReadList Expression: (Q)
  • Next by thread: Solaris and CDE