json_value_create_real Subroutine

private subroutine json_value_create_real(json, p, val, name)

Allocate a json_value pointer and make it a real(RK) variable. The pointer should not already be allocated.

Example

     type(json_value),pointer :: p
     type(json_core) :: json
     call json%create_real(p,'value',1.0_RK)

Type Bound

json_core

Arguments

Type IntentOptional Attributes Name
class(json_core), intent(inout) :: json
type(json_value), pointer :: p
real(kind=RK), intent(in) :: val
character(kind=CK, len=*), intent(in) :: name

Calls

proc~~json_value_create_real~~CallsGraph proc~json_value_create_real json_core%json_value_create_real proc~json_value_create json_value_create proc~json_value_create_real->proc~json_value_create proc~to_real json_core%to_real proc~json_value_create_real->proc~to_real proc~destroy_json_data destroy_json_data proc~to_real->proc~destroy_json_data

Source Code

    subroutine json_value_create_real(json,p,val,name)

    implicit none

    class(json_core),intent(inout)      :: json
    type(json_value),pointer            :: p
    real(RK),intent(in)                 :: val
    character(kind=CK,len=*),intent(in) :: name

    call json_value_create(p)
    call json%to_real(p,val,name)

    end subroutine json_value_create_real