Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(json_value), | , | pointer | :: | me | ||
character(kind=CK,len=*), | intent(in) | :: | name | variable name |
||
real(kind=RK), | intent(in) | :: | val | real value |
Add a real value child to the json_value variable
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(json_value), | public, | pointer | :: | var |
subroutine json_value_add_double(me, name, val)
implicit none
type(json_value),pointer :: me
character(kind=CK,len=*),intent(in) :: name !! variable name
real(RK),intent(in) :: val !! real value
type(json_value),pointer :: var
!create the variable:
call json_value_create(var)
call to_double(var,val,name)
!add it:
call json_add(me, var)
!cleanup:
nullify(var)
end subroutine json_value_add_double