Date: Mon, 4 Oct 1999 08:55:52 -0400 (EDT) From: Chee YapTo: bram@cs.nyu.edu Subject: Re: HW 2 program question Cc: v22_0310_003_fl99@cs.nyu.edu, yap@jinai.cs.nyu.edu Bram, thanks for the alert. I will cc this response to the whole class. Note to the rest of class: the function "readString" which we provided for your hw2 assumes that each line of the input file ends with the following 2-character sequence: "\r\n" (\r is [carriage-return] and \n is [newline] character). As Bram points out below, on some operating system, the sequence may be difference. On Bram's linux, each line terminates with the sequence "\n" only. So the question arises: what should your code assume when you hand it in? Here is what I want you to do: --keep readString as we have defined it. --if your system has a different line termination convention, I ask you to write the obvious variant of readString, but call it "myReadString". --you should test your code using "myReadString" but when you hand in your program, please revert back to "readString" so that we can test your program conveniently. [However, remember to leave "myReadString" in the program for us to check] Also note that java.io has a function readLine, which is unfortunately deprecated. I just prefer to avoid a call to a deprecated function. Hope this is clear, --Chee > From bram@cs.nyu.edu Sat Oct 2 16:54 EDT 1999 > Date: Sat, 02 Oct 1999 20:59:49 +0000 > From: Bram Sterling > To: yap@cs.nyu.edu > Subject: HW 2 program question > > Proffesor > I am programing under linux, and your file input code does not work > properly because it assumes carriage return + line feed newlines, but > linux uses line feed only. Should I hand in a version with your > origonal file input code, or one with linux style input? Also, this > could affect other students who use linux. > > Thank you > > Bram Sterling > > >