octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fgets behavior


From: PhilipNienhuis
Subject: fgets behavior
Date: Tue, 20 Mar 2012 12:30:56 -0700 (PDT)

>From the fgets help string:



>   Read characters from a file, stopping after a newline, or EOF, or
>   LEN characters have been read.  The characters read, including the
>   possible trailing newline, are returned as a string.
> 

... but shouldn't it read (additions in CAPITALS)
"
  Read characters from a file, stopping after a newline, or EOF, or
  LEN characters have been read, WHICHEVER COMES FIRST.  The
  characters read, including the possible trailing newline, are
  returned as a string.
"

...because that's how it turns out to work here: i.e., I specify LEN to be
beyond several newlines but fgets stops reading after the first newline.

Or is that not the intended behavior?

Philip


--
View this message in context: 
http://octave.1599824.n4.nabble.com/fgets-behavior-tp4490106p4490106.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]