codata_api.f90 Source File


This file depends on

sourcefile~~codata_api.f90~~EfferentGraph sourcefile~codata_api.f90 codata_api.f90 sourcefile~codata_version.f90 codata_version.f90 sourcefile~codata_api.f90->sourcefile~codata_version.f90

Files dependent on this one

sourcefile~~codata_api.f90~~AfferentGraph sourcefile~codata_api.f90 codata_api.f90 sourcefile~codata.f90 codata.f90 sourcefile~codata.f90->sourcefile~codata_api.f90 sourcefile~codata_capi.f90 codata_capi.f90 sourcefile~codata.f90->sourcefile~codata_capi.f90 sourcefile~codata_capi.f90->sourcefile~codata_api.f90

Source Code

module codata__api
    !! API.
    !! See [specs](../page/specs/api.html).
use codata__version, only: version
implicit none
private

character(len=:), allocatable, target, private :: version_f

public :: get_version

contains

function get_version()result(fptr)
    !! Get the version.

    character(len=:), pointer :: fptr 
        !! Fortran pointer to a string indicating the version.

    if(allocated(version_f))then
        deallocate(version_f)
    endif
    allocate(character(len=len(version)) :: version_f)
    version_f = version
    fptr => version_f
end function

end module codata__api