9 Generic procedures and operators for any data type
This chapter covers
- Writing generic procedures that work on any data type
- Using custom operators for cleaner code
- Redefining built-in operators
Every useful computer program takes some input data, performs a number of operations on that data, and outputs the results. The data that the program works with is stored in variables of various types. Different languages handle different types with different strictness. Fortran, being a strongly typed language, is quite strict about how you pass input arguments to functions and subroutines. Specifically, the data types of arguments between the procedure invocation and definition must match, or else the compiler will abort with an error message. ...
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.