Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
PURE FUNCTION replace(str_in,find,rep)RESULT(str_out)IMPLICIT NONE!-------------------------------------------! inputCHARACTER(LEN=*),INTENT(IN)::str_inCHARACTER(LEN=*),INTENT(IN)::findCHARACTER(LEN=*),INTENT(IN)::rep! outputCHARACTER(LEN=LEN(str_in))::str_out!-------------------------------------------! LOCAL VARIABLESCHARACTER(LEN=LEN(str_in))::str_tmpINTEGER::i_find,lfind,lrep!=============================================================================str_out=""str_tmp=TRIM(str_in)i_find=INDEX(str_tmp,TRIM(find))lfind=LEN_TRIM(find)lrep=LEN_TRIM(rep)DO WHILE(i_find>0)str_out=TRIM(str_out)//str_tmp(1:i_find-1)//TRIM(rep)str_tmp=str_tmp(i_find+lfind:)i_find=INDEX(str_tmp,TRIM(find))END DOstr_out=TRIM(str_out)//TRIM(str_tmp)END FUNCTION replace