Displaying 4 results from an estimated 4 matches for "nargout".
2009 Nov 26
1
Does nargin and nargout work with R functions?
I am porting some MATLAB functions over to R and hopefully into a package, so I am curious if nargin and nargout work with R functions.
Here is kind of an example of where I need to head in order to port "control-1.0.11" from Octave over to R. The Octave "control-1.0.11" package has the capability to produce bode plots of transfer functions. I hope to post this package once the port ove...
2011 May 31
2
[LLVMdev] multiple function return values in LLVM
Hi all,
How can I implement a multiple function return values scheme in a
performance efficient way, just like what be done in Matlab or Octave?
Thanks in advance,
Yabin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110531/5813e7a6/attachment.html>
2011 May 31
0
[LLVMdev] multiple function return values in LLVM
Hi Yabin,
Octave uses an octave_value_list object to return multiple values so I
don't think it has anything to do with the compiler.
A sample function that can be dynamically linked with Octave and
called from octave interpreter:
#include <octave/oct.h>
DEFUN_DLD (divmult, args, nargout, "") {
octave_value_list retval;
// do some computation to compute r0 and r1
retval(0) = r0;
retval(1) = r1;
return retval;
}
Hamid
> Hi all,
>
> How can I implement a multiple function return values scheme in a
> performance efficient way, just like what be done in...
2007 Jun 30
2
Determining whether a function's return value is assigned
...# Create bigobject here
if (return.value.assigned()) {
bigobject
} else {
summary(bigobject)
}
}
and
x <- myfunction() # bigobject is assigned
myfunction() # summary of bigobject is printed
Octave and MATLAB have the nargout function that does
what I want, and Perl has the wantarray function
detecting the context in which a function is called.
Perhaps match.call() can be made to do what I want,
but, if so, I don't see it in reading the
documentation.
Sincerely,
Paul Laub