json_value_add_logical Subroutine

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

Add a logical value child to the json_value variable.

Arguments

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

name of the variable

logical(kind=LK), intent(in) :: val

value


Contents


Source Code

    subroutine json_value_add_logical(json, p, name, val)

    implicit none

    class(json_core),intent(inout)      :: json
    type(json_value),pointer            :: p
    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%create_logical(var,val,name)

    !add it:
    call json%add(p, var)

    end subroutine json_value_add_logical