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.
Yolande, > I tried it and it does not work. The best runaround I've found is to > use the standard FORTRAN directives in my code and comment out the > #define command in the udunits.inc file. That will work. Unfortunately, it's not portable. > Instead I just define utmake > as an integer*4. Now I have no errors. Normally a C header file is > included in FORTRAN using #include and I would expect it to have > the .h extension. If it has the .inc extension I would think that it > would be a FORTRAN include file. For instance all the commands in > netcdf.inc are FORTRAN preprocessor commands (or at least are > understood by the FORTRAN pre-compiler). udunits.inc seems to be a > mix of C and FORTRAN commands... The file "udunits.inc" is a mixture of preprocessor directives and Fortran statements. It is designed to be included by the Fortran preprocessor before the Fortran compiler ever sees the code. This was the only portable solution because the Fortran-77 Standard doesn't specify any mechanism for including other files. Various compiler vendors have come up with various solutions, but none of them are (or were, at least) portable. > Anyway, I'll go with my edited udunits.inc file for now. I'm > surprised that no other FORTRAN programmers have run into this issue?? Other Fortran programmers haven't had this issue because they use preprocessor include directives rather than non-standard Fortran include statements. > I appreciate your time today, Yolande Good luck. Regards, Steve Emmerson Ticket Details =================== Ticket ID: QKV-165487 Department: Support UDUNITS Priority: Normal Status: Closed