octave-maintainers
[Top][All Lists]
Advanced

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

passing parameters to dynamically-linked functions


From: John W. Eaton
Subject: passing parameters to dynamically-linked functions
Date: Tue, 05 Aug 2008 23:18:43 -0400

On 31-Jul-2008, Thomas L. Scofield wrote:

| 
| Parameters in Matlab are often passed in the manner
| 
|     functionName ( ..., 'parameterName', 'parameterValue' )
| 
| I am wondering if there is an established approach for organizing  
| such parameters, perhaps in a cell array(?), so that they are easily  
| passed on to and parsed within a dynamically-linked function.   
| Perhaps the kind of answer I am looking for goes like this: "for an  
| example, see the m-file ______ which accepts additional parameters  
| like these and then passes them along to the dynamically-linked  
| function _______."

I can't think of a specific example, but I think you would probably
want to call the dynamically linked function from the .m file with

  args = varargin(first_parameter_arg:end);
  dynamically_linked_function (..., args{:});

or similar so that the dynamically linked function just sees a normal
argument list in an octave_value_list object..

Does that help?

jwe





reply via email to

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