Skip to content
Prev 244 / 63421 Next

R-alpha: unif_rand() again

I did.  I hoped that something like

static char *func = "runif";

double unif_rand() {
  void *in[3];
  char *modes[] = { "integer", "integer", "integer" };
  long lengths[] = { 1, 1, 1 };  
  void *out[1];
  double *result;

  in[0] = (void *)1L;
  in[1] = (void *)0L;
  in[2] = (void *)1L;  
  call_S((void *)func, 3L, in, modes, lengths, 0L, 1L, out);
  result = (double *)out[0];
  return(result[0]);
}

might work, but it does not ...

-k


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-