MathGroup Archive 2007

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

Search the Archive

Undocumented change V5->V6 in Read

  • To: mathgroup at
  • Subject: [mg81563] Undocumented change V5->V6 in Read
  • From: dh <dh at>
  • Date: Wed, 26 Sep 2007 21:55:54 -0400 (EDT)


create a file with content: a\r\nb\r\nc\r

where \r and \n symbolize carriage return and line feed.

Now open the file and set the stream pointer successively to 0,1,2.. and 

read a string:

str = OpenRead[filename];



   Print[ Read[str,String] //FullForm];



Version 5 gives: "a","","b","","c"

Version 6 gives: "a","b","b","c","c"

Obviously, the implementation of reading a string has been changed.

I like this new "feature", however, it gives me a lot of troubles with 

older programs that parse files using "Find". Here you often needed an 

additional "Skip" that is no more necessary in V6.

One can force the old behavior by the option: NullRecords->True, 

however, I was not able to get the new behavior in V6. Further, in V5 

the default value of NullRecords is False, but there seems to be a bug.


  • Prev by Date: Re: Mellin Transform
  • Next by Date: create a list with x,y,z coordinates
  • Previous by thread: Integrate using Assumptions
  • Next by thread: create a list with x,y,z coordinates