[R-pkg-devel] Solaris SPARC, Fortran, and logical errors?

Avraham Adler avraham.adler at gmail.com
Wed Mar 15 19:31:21 CET 2017


On Wed, Mar 15, 2017 at 12:19 PM, William Dunlap <wdunlap at tibco.com> wrote:
> I don't know about the current Sparc Fortran compilers, but over the
> years have learned not to try to pass logicals and character strings
> between C and Fortran.  I have seen Fortran compilers that treated
> integer -1 (all bits 1) as .true. and anything else as .false. and I
> have see ones that looked only at bit 7, counting from the right, to
> determine the value.
>
> I recommend changing your Fortran code to accept an integer instead of
> a logical for boolean inputs and outputs.


I was using the iso_c_bindings in Fortran 2003, but I guess they are
not part of the SPARC compiler. I will probably end up doing that.
Thank you.

Avi



More information about the R-package-devel mailing list