help-octave
[Top][All Lists]
Advanced

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

FW: nargin / argv not working....correction...


From: Hall, Benjamin
Subject: FW: nargin / argv not working....correction...
Date: Fri, 7 May 2004 13:04:30 -0400

Only nargin shows 0, the arguments are in argv.  Sorry about that!

Ben

>  -----Original Message-----
> From:         Hall, Benjamin  
> Sent: Friday, May 07, 2004 12:59 PM
> To:   'address@hidden'
> Subject:      nargin / argv not working as (I) expected at octave-2.1.57
> startup
> 
> I'm trying to setup some octave scripts to be called directly from the
> command line, but the nargin and argv are not working as expected.  The
> following script (myargex.m, basically straight from the documentation)
> 
> #########################################
> #! /usr/local/bin/octave -qf
> 
> printf("Program: %s\n",program_name)
> 
> nargin
> 
> for kk = 1:nargin
>    printf("   arg %d: %s\n",kk,argv{kk} )
> end
> #########################################
> 
> works as expected in octave 2.1.50
> 
> /usr/local/bin/octave-2.1.50 -qf myargex.m some args here
> 
> displays all the arguments, but in 2.1.57
> 
> /usr/local/bin/octave-2.1.57 -qf myargex.m some args here
> 
> displays, nargin = 0, and of course none of the arguments
> 
> Any thoughts on how to fix this?
> 
> Thanks
> Ben



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