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.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
integer,
private
::
i
integer,
private
::
j
integer,
private
::
ncols
integer,
private
::
nrows
character(len=50),
private
::
temp_str
integer,
private
::
total_len
Source Code
function to_char_matrix_int32(array)result(trimmed_str)integer(int32),intent(in)::array(:,:)character(len=:),allocatable::trimmed_strcharacter(len=50)::temp_strinteger::i,j,total_len,nrows,ncolsnrows=size(array,1)ncols=size(array,2)! Estimate total length neededtotal_len=10! for outer brackets and newlinesdo i=1,nrowstotal_len=total_len+3! for row brackets and commado j=1,ncolswrite(temp_str,'(I0)')array(i,j)total_len=total_len+len_trim(temp_str)+2! +2 for ", "end do end do! Allocate result stringallocate(character(len=total_len)::trimmed_str)! Build the stringtrimmed_str="["do i=1,nrowsif(i>1)trimmed_str=trimmed_str//", "trimmed_str=trimmed_str//"["do j=1,ncolswrite(temp_str,'(I0)')array(i,j)if(j<ncols)thentrimmed_str=trimmed_str//trim(temp_str)//", "elsetrimmed_str=trimmed_str//trim(temp_str)end if end dotrimmed_str=trimmed_str//"]"end dotrimmed_str=trimmed_str//"]"end function to_char_matrix_int32