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.
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
recursive function binary_search(Ain,value)result(bsresult)integer,intent(in)::Ain(:),valueinteger::bsresult,midinteger,dimension(size(Ain))::A,Order!a=aincall sort_array(a,Order)!mid=size(a)/2+1if(size(a)==0)thenbsresult=0! not found!stop "binary_search error: value not found"else if(a(mid)>value)thenbsresult=binary_search(a(:mid-1),value)else if(a(mid)<value)thenbsresult=binary_search(a(mid+1:size(a)),value)if(bsresult/=0)thenbsresult=mid+bsresultend if elsebsresult=mid! SUCCESS !end if!bsresult=Order(bsresult)!end function binary_search