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.
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
character(len=:),
private,
allocatable
::
joined
integer,
private
::
lt
integer,
private
::
ltot
integer,
private
::
pos
character(len=:),
private,
allocatable
::
sep
Source Code
pure type(string_type)function join_string(strings,separator)type(string_type),intent(in)::strings(:)character(len=*),intent(in),optional::separatorinteger::ltot,i,lt,poscharacter(len=:),allocatable::sep,joined! Determine separator: use user-provided separator or default spaceif(present(separator))thensep=separatorelsesep=' 'end if! Calculate the total length required, including separatorsltot=sum(len_trim(strings))+(size(strings)-1)*len(sep)allocate(character(len=ltot)::joined)! Concatenate strings with separatorpos=0do i=1,size(strings)lt=len_trim(strings(i))joined(pos+1:pos+lt)=char(strings(i),1,lt)pos=pos+ltif(i<size(strings))thenjoined(pos+1:pos+len(sep))=seppos=pos+len(sep)end if end do call move(from=joined,to=join_string)end function join_string