Message-ID: <34726566.7BE99635@ibm.net> Date: Tue, 18 Nov 1997 23:04:57 -0500 From: Elvis Dieguez MIME-Version: 1.0 To: DJGPP Mail Group Subject: Scanf Function and EOF Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk I am learning how to program in C and I have the following problem: I wrote a simple While-loop that scans in some strings until the EOF marker is reached (or Cntrl-D is pressed). The loop works correctly when compiled on a Unix compiler but refuses to do so when compiled with DJGPP. According to my text book, the scanf function returns EOF when it reaches the end of the line or an error occurs. That seems to me to be the problem.... I am not sure though.. and would appreciate some help ASAP because this project is due next week... Thank You, Elvis Dieguez PS I read the FAQ but I did not find anything to help me.... PPS Here is the loop: while( scanf("%s", array[i]) != EOF){ ++i; }