Fortran 77 Version of Fisher & Mitchell Examples | Fortran 90 Version of Fisher & Mitchell Examples |
View with button1 or down-load with button3 |
The following examples are from the appendices of:
Description of Examples | Source Code |
Appendix A: This example shows how to encapsulate an old, ugly, but fast library FFT to increase program safety and ease of use. | One-Dimensional FFT Module |
Appendix B: Shows how to encapsulate a new type and a particle pushing operation in a Fortran 90 module. This simplifies the interface to the original, complicated, but efficient particle pushing routine. | Species Module |
Appendix C: An example showing how to construct classes using Fortran 90 modules and derived types. Encapsulation and operator overloading are used in defining a complex number class where the data components are private. | Private_Complex Class |
Appendix D: Inheritance using class composition is applied in building private_complex arrays. The derived class was constructed by the definitions and procedures defined in a base class. | Complex_Array Class |
Appendix E: Inheritance using class sub-typing is emulated in building a monitor_complex class. All of the base class procedures have been extended to work in the derived class. | Monitor_Complex Class |
Appendices F & G: This examples introduces improvements and extensions on Appendix B. Information describing a particle species is encapsulated into new class that is "inherited" by a derived species class. | Species Class |
Appendix H: An example of how run-time polymorphism can be supported using a dynamic dispatching approach. (Currently produces incorrect results with the Absoft compiler.) | Complex_Subtype Class |
View with button1 or down-load with button3 |
The following set of examples are for those who are already familiar with the C++ Programming Language. They have been translated from the text:
Document Reference | Source Code |
Lippman, pp. 73-77 | Stack Class |
Lippman, pp. 150-163. | List Class |
Lippman, pp. 277-279 | Word Class |
Lippman, pp. 279-298 | String Class |
View with button1 or down-load with button3 |
Additional examples may be forthcoming.