help-octave
[Top][All Lists]
Advanced

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

Re: looping over file objects


From: taltman
Subject: Re: looping over file objects
Date: Fri, 14 Nov 2003 18:33:37 +0000 (UTC)

On Nov 14, 2003 at 10:30am, Przemek Klosowski wrote:

przeme >fopen() already returns the second optional value (the error message),
przeme >so we could just extend that:
przeme >
przeme > - return additional, structure value for three return arguments:
przeme >
przeme >    fopen('abc')  => ans=3
przeme >    [a,msg,b]=fopen('abc') => a=3, msg='', 
b={id=3,name=abc,mode=r,arch=native,status=open}

I like your first option. It's just one more argument at the end,
should leave most scripts unchanged, satisfies the Matlab
compatibility constraint, and still provides additional information. 

~Tomer



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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