Skip to content
Prev 4314 / 10988 Next

[Rcpp-devel] Unit Test Question Was: pnorm/qnorm?

On 09/12/2012 09:59 AM, Dirk Eddelbuettel wrote:
Hi Gang:

It is not hidden.  But, I'm wondering if anyone knows of a C++
IDE setup that can visually resolve these prototypes.  I'm not sure
what the right terminology is, but emacs calls it intellisense if
that helps.  I have been experimenting with the emacs packages CEDET
and ECB.  emacs does not report the right prototype for qnorm.  I'm
not sure exactly how emacs does this, but I believe that I have
specified GNU Global/gtags.  I'm still struggling with Eclipse and I
haven't tried Xcode.  Has anyone had any luck with their IDE in this
regard?  Please let me know.  See the example below...

#ifndef DEBUG
#include <Rcpp.h>

using namespace Rcpp;
using namespace Rcpp::stats;

#endif

NumericVector x=qnorm(as<NumericVector>(arg1), as<double>(arg2), 1.);

return wrap(x);

If I place the cursor at wrap(, then I see the function prototype in
the minibuffer: "wrap.h: inline SEXP wrap(const T& object)".
That's very nice!  However, if I place it at qnorm(, then all I get is:
"Rmath.h: const extern "C" qnorm".

Thanks