From help-octave-request at che dot utexas dot edu Fri Jan 27 16:18:30 1995 Subject: Re: problem with feof() function in octave 1.1 From: John Eaton To: Dutt dot Vinayak at mayo dot EDU cc: help-octave Date: Fri, 27 Jan 95 16:18:27 CST vdp at us0 dot mayo dot EDU (Vinayak Dutt) wrote: : i was trying to use feof() function to test end-of-file condition in : the new octave 1.1 when i get error message: : : octave:15> err = feof(f) : error: range error : error: invalid conversion from to real scalar : error: inapproriate file specifier : error: evaluating index expression near line 15, column 11 : error: evaluating assignment expression near line 15, column 5 : : here f is the file opened with fopen(). This has been fixed for 1.1.1. Here is a patch: Thu Jan 19 08:33:50 1995 John Eaton * src/file-io.cc (feof_internal): Use args(0), not args(1). *** src/file-io.cc~ 1995/01/04 04:05:12 --- src/file-io.cc 1995/01/19 15:07:59 *************** *** 1773,1779 **** Octave_object retval; // Get file info. ! Pix p = return_valid_file (args(1)); if (! p) return retval; --- 1773,1779 ---- Octave_object retval; // Get file info. ! Pix p = return_valid_file (args(0)); if (! p) return retval; BTW, it's probably best to send bug reports to bug-octave instead of help-octave. Thanks, jwe