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.
Source Code
function c_ptr_to_string(ptr)result(fstr)type(c_ptr),intent(in)::ptrcharacter(len=:),allocatable::fstrcharacter(kind=c_char),pointer::cstr(:)integer::len,i! 1) C ポインタを 256 要素の CHARACTER(C_CHAR) 配列にマップcall c_f_pointer(ptr,cstr,[256])! 2) ヌル終端までカウントlen=0do while(len<256.and.cstr(len+1)/=c_null_char)len=len+1end do! 3) allocatable 文字列を len で確保allocate(character(len=len)::fstr)! 4) 1文字ずつコピーdo i=1,lenfstr(i:i)=cstr(i)end do end function c_ptr_to_string