Skip to content
Prev 604 / 10988 Next

[Rcpp-devel] short, unsigned short, long, unsigned long, long double

Le 06/04/10 15:46, Douglas Bates a ?crit :
I should have said sorry. I cast to the "most acceptable" type :

short          -> INTSXP
long           -> REALSXP
long double    -> REALSXP
unsigned short -> INTSXP
unsigned long  -> REALSXP

This is similar to what rJava does with similar java primitive types.

Some precision is lost, but I find this more acceptable than the crytpic 
error messages you'd get otherwise. This of course will need some 
documentation.

Romain