Hello All,

In some package I use a c-routine which calls a fortran routine which
expects a char-string as input.

As per the writing R-extensions manual,
the Fortran routine is declared in C as:
void F77_NAME (setoptions) (char **option);

and then it is calles as follows:

   char **option; 
   option = new char*[1];
   option[0] = new char[256];
   option[0] = strcpy(option[0],"Iteration Limit = 100");
   Rprintf(option[0]);
   F77_CALL (setoptions) (option);

Unfortunately this does not work, ie the fortran routine setoptions does
not correctly get the intended character string. Can anyone point me to a
working example  of passing characters from C to Fortran? Or tell me what's
wrong in my code above?

My platform is below, I use R CMD INSTALL to compile and install the
complete package.

thanks in advance, ingmar visser

platform powerpc-apple-darwin6.8
arch     powerpc   
os       darwin6.8 
system   powerpc, darwin6.8
status             
major    1         
minor    9.0       
year     2004      
month    04        
day      12        
language R

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to