liu.seSearch for publications in DiVA
Change search
ReferencesLink to record
Permanent link

Direct link
Standardized mixed language programming for Fortran and C
Linköping University, Department of Mathematics, Scientific Computing. Linköping University, The Institute of Technology.
Visual Numerics Inc., Albuquerque, NM.
University of Kent, Canterbury, England.
2009 (English)In: ACM SIGPLAN Fortran Forum, ISSN 1061-7264, Vol. 28, no 3, 8-22 p.Article in journal (Refereed) Published
Abstract [en]

Programmers have long practiced the matter of mixed language procedure calls. This is particularly true for the programming languages C and Fortran. The use of the alternate language often results in efficient running time or the effective use of human or other resources.

Prior to the Fortran 2003 standard there was silence about how the two languages interoperated. Before this release there existed a set of differing ad hoc methods for making the inter-language calls. These typically depended on the Fortran and C compilers. The newer Fortran standard provides an intrinsic module, iso_c_binding, that permits the languages to interoperate. There remain restrictions regarding interoperable data types.

This paper illustrates several programs that contain core exercises likely to be encountered by programmers. The source code is available from the first author's web site. Included is an illustration of a "trap" based on use of the ad hoc methods: A call from a C to a Fortran 2003 routine that passes a character in C to a character variable in Fortran results in a run-time error.

Place, publisher, year, edition, pages
New York: ACM , 2009. Vol. 28, no 3, 8-22 p.
Keyword [en]
Fortran, C
National Category
Software Engineering
URN: urn:nbn:se:liu:diva-52950OAI: diva2:286269
Available from: 2010-01-14 Created: 2010-01-14 Last updated: 2010-01-22

Open Access in DiVA

No full text

Other links

Search in DiVA

By author/editor
Einarsson, Bo
By organisation
Scientific ComputingThe Institute of Technology
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 318 hits
ReferencesLink to record
Permanent link

Direct link