From help-octave-request at bevo dot che dot wisc dot edu Mon Jan 22 04:00:02 2001 Subject: Re: .oct-files/ library-wrapper From: Paul Kienzle To: Ben Sapp Cc: Daniel Heiserer , "help-octave@bevo.che.wisc.edu" Date: Mon, 22 Jan 2001 02:50:23 +0000 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 pkienzle at kienzle dot powernet dot co dot uk ------------------------------------------------------------- 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 -------------------------------------------------------------