Consider the following set of Fortran module files:
(These files are actually part of the ParaMonte library). These modules depend on each other:
Math_mod
usesConstants_mod
andString_mod
,String_mod
usesConstants_mod
andJaggedArray_mod
,JaggedArray_mod
usesConstants_mod
,
Write a main Fortran program that uses the String_mod
compiled as an external DLL library file named string
. The program calls the replaceStr()
function in String_mod
to replace "FORTRAN"
with "Fortran"
in the following sentence,
sentence = "FORTRAN is a highly flexible expressive natively-parallel programming language for numerical computing."
such that the output of the main program is the following,
mainCallString.exe
Fortran, not FORTRAN, is a highly flexible expressive natively-parallel programming language for numerical computing.
Now, write a main Fortran program which calls the getDistanceSq()
function of Math_mod
from the math
DLL (that you will have to build). Note that this Math_mod will depend on the string
DLL file from the previous problem in the above.