json_get_real32_vec_by_path Subroutine

private subroutine json_get_real32_vec_by_path(json, me, path, vec, found)

Alternate version of json_get_real_vec_by_path where vec is real32.

Arguments

Type IntentOptional AttributesName
class(json_core), intent(inout) :: json
type(json_value), intent(in), pointer:: me
character(kind=CK,len=*), intent(in) :: path
real(kind=real32), intent(out), dimension(:), allocatable:: vec
logical(kind=LK), intent(out), optional :: found

Contents


Source Code

    subroutine json_get_real32_vec_by_path(json, me, path, vec, found)

    implicit none

    class(json_core),intent(inout)                    :: json
    type(json_value),pointer,intent(in)               :: me
    character(kind=CK,len=*),intent(in)               :: path
    real(real32),dimension(:),allocatable,intent(out) :: vec
    logical(LK),intent(out),optional                  :: found

    real(RK),dimension(:),allocatable :: tmp

    call json%get(me, path, tmp, found)
    if (allocated(tmp)) vec = real(tmp,RK)

    end subroutine json_get_real32_vec_by_path