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
::
best_d
integer,
private
::
best_i
integer,
private
::
d
integer,
private
::
i
integer,
private
::
thresh
Source Code
function suggest(name,candidates)result(msg)!! Build a " (did you mean 'x'?)" fragment if a close candidate!! exists (distance <= max(2, len/3)); else empty.character(len=*),intent(in)::namecharacter(len=*),intent(in)::candidates(:)character(len=:),allocatable::msginteger::i,d,best_d,best_i,threshmsg=""best_d=huge(0)best_i=0thresh=max(2,len_trim(name)/3)do i=1,size(candidates)d=levenshtein(lower(trim(name)),lower(trim(candidates(i))))if(d<best_d)thenbest_d=dbest_i=iend if end do if(best_i>0.and.best_d<=thresh)thenmsg=" (did you mean '"//trim(candidates(best_i))//"'?)"end if end function suggest