help-octave
[Top][All Lists]
Advanced

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

Re: .oct-files/ library-wrapper


From: Paul Kienzle
Subject: Re: .oct-files/ library-wrapper
Date: Mon, 22 Jan 2001 02:50:23 +0000
User-agent: Mutt/1.2.5i

On Fri, Jan 19, 2001 at 09:12:12AM -0700, Ben Sapp wrote:
> Daniel Heiserer wrote:
> > 
> > Hi,
> .
> .
> .
> > How do I define multiple output arguments is it the same
> > by just creating a list?
> > retval(1) = a;
> > retval(0) = b;
> 
> I don't think that will work.  Below is a small example that will work.
> You use the third arguement to your DLD function to find out how many
> arguements are asked for on the command line.   Then you add elements to
> the list by using the append and prepend member functions.  

Actually, Daniel's suggested style is used in the builtin DLD-FUNCTIONS, 
such as this example from lu.cc:

            case 3:
            default:
              retval(2) = fact.P ();
              retval(1) = fact.U ();
              retval(0) = fact.L ();
              break;

In fact there are no instances of append/prepend in the 2.1.31 
src/DLD-FUNCTIONS directory.

Paul Kienzle
address@hidden




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