G'day Brian,
On Thu, 8 Apr 2010 12:40:45 +0100 (BST) Prof Brian Ripley <rip...@stats.ox.ac.uk> wrote: > On Thu, 8 Apr 2010, Berwin A Turlach wrote: [...] > > Thus, given that the port of quadprog existed for quite some time, I > > am wondering whether it is o.k. to pass R objects with storage mode > > logical into FORTRAN code to arguments declared as LOGICAL? Or > > should the FORTRAN code be corrected to declare the argument in > > question as INTEGER? > > The second to be safe. [...] Thanks for the quick and informative response. I will make the necessary changes. BTW, can I assume that if R passes down TRUE to the FORTRAN routine the corresponding integer argument will be set to 1, and that it will be set to zero if FALSE is passed down? Likewise, can I assume that if at the end of the FORTRAN routine the integer holds a value of zero, then FALSE is passed back to R and if the integer holds any other value then TRUE is passed back? I don't remember ever reading any documentation about this; and most documentation that I would search is not at hand but back on the bookshelves of my office..... Cheers, Berwin ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel