> On 21 Sep 2015, at 04:03 , Cleber N.Borges <[email protected]> wrote:
> 
> Dear useRs,
> 
> I would like some help on how to make the sum of 1 + 1
> but using the interface between A and C.
> 
> the function call does .call lock and close the R.
> 
> Thank you for any help it.

Either you need a basic course in C, or you need a refresher....:


> 
> void testfun( double *k, double *res )
> {
>    res = k + 1;
> }

C is call by value and k and res are pointers. You need a dereferencing step or 
nothing with happen. Try

*res = *k + 1;


-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: [email protected]  Priv: [email protected]

______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to