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