help-octave
[Top][All Lists]
Advanced

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

'varargin' problem


From: Aron Lentsch
Subject: 'varargin' problem
Date: Sun, 23 Feb 2003 16:05:24 -0600

Hi there,

I recently installed Octave version 2.1.44 and since 
then one of my "ancient" scripts doesn't work anymore.

I identiefied the problem to be related to 'varargin'.  
Up to version 2.1.34 of Octave everything worked well.

The problem is most simpley outlined by the following 
test script:

----------------
test.m
----------------
1;

gap.A = 200;  
gap.B = 8;
gap.C = 'Gray';

## fields = struct_elements(gap)   #  works OK

test_sub( gap )
----------------

----------------
test_sub.m
----------------
function  retval = test_sub(varargin)
  fields = struct_elements(varargin)
endfunction
----------------

If the call 'struct_elements' is in the main program 
there is no problem. If however 'struct_elements' is 
called from the sub-routine I get the following 
runtime-error:

>> test
error: struct_elements: wrong type argument `cell'
error: evaluating assignment expression near line 3, 
column 10
error: called from `test_sub' in file 
`/home/aron/act/dev/trajectory/triamese/optimization/GeneticAlg/test_sub.m'
error: near line 9 of file 
`/home/aron/act/dev/trajectory/triamese/optimization/GeneticAlg/test.m'


I suppose this problem is a bug. Or do I do something
wrong? Is there a work-around?

Thanks for the help,
Aron


-- 

   | A r o n   L E N T S C H
   |
   | 178, rue P. Vaillant Couturier
   | 94140 Alfortville   -   FRANCE
   |
   | home:   address@hidden  |  +33-1-4353-2433
   | office: address@hidden  |  +33-1-6087-7324



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