ReadList and FortranForm data
- To: mathgroup at smc.vnet.net
- Subject: [mg8426] ReadList and FortranForm data
- From: Sean Ross <seanross at worldnet.att.net>
- Date: Sat, 30 Aug 1997 00:42:34 -0400
- Sender: owner-wri-mathgroup at wolfram.com
I have never been able to figure out how to read in data from a text file that is separated by spaces with return characters at the end of each line. ie 1 2 3 4 5 6 7 8 etc. The big problem is that Mma interprets the spaces as multiplication operators. I have tried specifying spaces as WordSeparators, RecordSeparators, but have not been successful. My work-around is to read the whole thing in as a String using the Word option, then manually put commas in where the spaces were and use ToExpression to convert to numbers again. Unfortunately, this method fails with Fortran-like data since the e-01 are interpreted as exponentials. Can someone give me the syntax to read in space separated data please.