help-octave
[Top][All Lists]
Advanced

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

Re: varargin with executable octave scripts


From: John W. Eaton
Subject: Re: varargin with executable octave scripts
Date: Wed, 13 Oct 2004 11:38:21 -0400

On 13-Oct-2004, David Bateman <address@hidden> wrote:

| According to address@hidden <address@hidden> (on 10/12/04):
| > Thanks David. Both versions work. I am able to open a file mentioned on
| > the command line by refering to it as vararg{1}, vararg{2} etc.
| > Now, can you give also a pointer to your specific source of information,
| > or it is not that simple ?
| > Cheers, Avraham
| 
| If you are going to use argv{i} in a for-loop it is obvious that 
| length(argv) is the number of times the for-loop needs to be called,
| so there is no special source of knowledge there. For the __nargin__
| I'm aware that in 2.1.58, __nargin__ appears as a local variable
| (but probably shouldn't), as whos will show... In fact on 2.1.60
| I just tried this
| 
| % octave -q
| octave:1> nargin
| ans = 1
| octave:2> __nargin__
| __nargin__ = 1
| octave:3> argv{1}
| ans = -q
| 
| so it is quite frankly puzzling that your original example didn't 
| work.

I think the problem with nargin not working properly was a bug that
has been fixed.

jwe



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