Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!usc!elroy.jpl.nasa.gov!aero!tak From: tak@aerospace.aero.org (Michael L. Takayama) Newsgroups: comp.sys.sgi Subject: Re: Array boundary checking & Fortran <> C translators Message-ID: <66244@aerospace.AERO.ORG> Date: 5 Feb 90 17:38:04 GMT References: <90Jan25.135818est.57895@ugw.utcs.utoronto.ca> <65973@aerospace.AERO.ORG> <49566@sgi.sgi.com> Reply-To: tak@aero.UUCP (Michael L. Takayama) Organization: The Aerospace Corporation, El Segundo, CA Lines: 32 Thanks for the reminder... guess that it is time to re-read the ol' K&R! Verification, please - automatic conversion of float to double occurs in the parameter declaration of a function in C. When calling a Fortran routine from C, this conversion does *not* occur, i.e. a float passed from C to Fortran should be correctly interpreted as a REAL? Example: subtestc() { float a; a = 1234.5678; subtestf_(&a); } SUBROUTINE SUBTESTF(A) REAL A WRITE(*,*) A RETURN END Thanks again (wish you guys were on the Hotline!) - Michael L. Takayama Computer-Aided Engineering Department The Aerospace Corporation