From help-octave-request at bevo dot che dot wisc dot edu Wed Feb 4 09:51:31 2004 Subject: converting to new streampos syntax ? From: "Pascal A. Dupuis" To: help-octave at bevo dot che dot wisc dot edu Date: Wed, 4 Feb 2004 09:24:45 -0600 There was a recent change in the interface of ftell, now returning a streampos object. How can I now perform the following operations ? 1) tell if a stream is seekable. Old way: cur_pos = ftell(FID); cur_pos > -1 || error('Can''t seek'); 2) push back one character onto a stream. Old way: fseek(FID, cur_pos - 1); according to the C++ standards, streampos is an object dealing with characters streams, so going back one character should be valid. Thanks in advance Pascal Dupuis -- Dr. ir. Pascal Dupuis K. U. Leuven, ESAT/ELECTA (formerly ELEN): http://www.esat.kuleuven.ac.be/ Kasteelpark Arenberg, 10; B-3001 Leuven-Heverlee, Belgium Tel. +32-16-32 10 21 -- Fax +32-16-32 19 85 ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------