This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Roderick, >Date: Wed, 16 Mar 2005 11:41:03 -0700 >From: "Pearson, Roderick R" <address@hidden> >Organization: University of Texas at El Paso >To: "Steve Emmerson" <address@hidden> >Subject: I misspoke The above message contained the following: > I will try to clarify my ideas. When I compile FORTRAN code that = > includes the udunits.inc file, what options will allow me to use the = > udunits file which seems to be compiled with the CC compiler and is more = > suitable for inclusion in a C program? I get no errors when I make the = > udunits package but the FORTRAN compiler does not like the include file = > despite it's supposed usability with FORTRAN. Any Fortran code that includes the "udunits.inc" file via a "#include" directive will have to be preprocessed via the C preprocessor or something similar. Typically, this is done automatically if the Fortran file in question has a capital "F" suffix (e.g., "foobar.F"). For example: $ cat foobar.F subroutine foobar #include "udunits.inc" end $ type f77 f77 is hashed (/opt/SUNWspro/bin/f77) $ f77 -c foobar.F /tmp/fpp.29444.0.f: foobar: Does this answer your question? Regards, Steve Emmerson