octave-maintainers
[Top][All Lists]
Advanced

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

Re: [fem-fenics] Function evaluation


From: Kai Torben Ohlhus
Subject: Re: [fem-fenics] Function evaluation
Date: Thu, 26 Jun 2014 09:14:12 +0200

On Wed, Jun 25, 2014 at 1:06 PM, Eugenio Gianniti <address@hidden> wrote:
The first one concerns the handling of output arguments: currently the function evaluation stops complaining about their wrong number if they are not as much as the values the function takes. Probably it is too strict, but I do not know if there is an expected behaviour for Octave functions in this aspect or any guidelines to follow.


Hi Eugenio,

Do you face the "variable number of return values" in the context of m-files or within C++ code? For the first one you should sort your return values by decreasing necessity and then check via "nargout" the number of them. Then you might be able to avoid computations, if the caller doesn't request certain values of the return list.

[1] https://www.gnu.org/software/octave/doc/interpreter/Variable_002dlength-Return-Lists.html#Variable_002dlength-Return-Lists

Best,
Kai 

reply via email to

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