11 Interoperability with C: Exposing your app to the web

This chapter covers

  • Why invoke C code from Fortran?
  • Interfacing with C built-in types, structs, and functions from Fortran
  • Writing a minimal Fortran TCP client and server

Pure Fortran is powerful for the numerical and array-oriented computation that’s ubiquitous in physical sciences and engineering. However, quite a few things aren’t possible in Fortran alone; fortunately, they can be done in a low-level systems programming language such as C. They include reading and writing data to hardware devices, drawing graphics on the screen in real time, and sending data over the internet. Interoperability with C allows a programmer to call C functions from Fortran programs. This is important ...

Get Modern Fortran now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.