to_logical Subroutine

private subroutine to_logical(me, val, name)

Arguments

Type IntentOptional AttributesName
type(json_value), intent(inout) :: me
logical(kind=LK), intent(in), optional :: val

if the value is also to be set (if not present, then .false. is used).

character(kind=CK,len=*), intent(in), optional :: name

if the name is also to be changed.

Description

Change the json_value variable to a logical.

Calls

proc~~to_logical~~CallsGraph proc~to_logical to_logical proc~destroy_json_data destroy_json_data proc~to_logical->proc~destroy_json_data
Help

Called By

proc~~to_logical~~CalledByGraph proc~to_logical to_logical proc~json_value_add_logical json_value_add_logical proc~json_value_add_logical->proc~to_logical interface~json_add json_add proc~json_value_add_logical->interface~json_add proc~json_update_logical json_update_logical proc~json_update_logical->proc~to_logical proc~json_update_logical->interface~json_add proc~json_value_create_logical json_value_create_logical proc~json_value_create_logical->proc~to_logical proc~parse_value parse_value proc~parse_value->proc~to_logical proc~parse_array parse_array proc~parse_value->proc~parse_array proc~parse_object parse_object proc~parse_value->proc~parse_object proc~wrap_json_value_add_logical wrap_json_value_add_logical proc~wrap_json_value_add_logical->proc~json_value_add_logical interface~json_add->proc~json_value_add_logical proc~json_value_add_double json_value_add_double interface~json_add->proc~json_value_add_double proc~json_value_add_logical_vec json_value_add_logical_vec interface~json_add->proc~json_value_add_logical_vec proc~json_value_add_integer json_value_add_integer interface~json_add->proc~json_value_add_integer proc~json_value_add_double_vec json_value_add_double_vec interface~json_add->proc~json_value_add_double_vec proc~json_value_add_integer_vec json_value_add_integer_vec interface~json_add->proc~json_value_add_integer_vec proc~json_value_add_string_vec json_value_add_string_vec interface~json_add->proc~json_value_add_string_vec proc~json_value_add_string json_value_add_string interface~json_add->proc~json_value_add_string proc~json_update_integer json_update_integer proc~json_update_integer->interface~json_add proc~test_7 test_7 proc~test_7->interface~json_add proc~json_value_add_double->interface~json_add proc~parse_array->proc~parse_value proc~parse_array->interface~json_add proc~json_value_add_logical_vec->interface~json_add proc~test_12 test_12 proc~test_12->interface~json_add interface~json_update json_update proc~test_12->interface~json_update proc~add_variables_to_input add_variables_to_input proc~add_variables_to_input->interface~json_add proc~parse_object->proc~parse_value proc~parse_object->interface~json_add proc~parse_object->proc~parse_object proc~json_value_add_integer->interface~json_add proc~json_update_double json_update_double proc~json_update_double->interface~json_add proc~json_value_add_double_vec->interface~json_add proc~test_2 test_2 proc~test_2->interface~json_add proc~test_2->proc~add_variables_to_input proc~test_2->interface~json_update proc~json_value_add_integer_vec->interface~json_add proc~json_update_string json_update_string proc~json_update_string->interface~json_add proc~json_value_add_string_vec->interface~json_add proc~test_4 test_4 proc~test_4->interface~json_add proc~json_value_add_string->interface~json_add proc~wrap_json_update_integer wrap_json_update_integer proc~wrap_json_update_integer->proc~json_update_integer interface~json_update->proc~json_update_logical interface~json_update->proc~json_update_integer interface~json_update->proc~json_update_double interface~json_update->proc~json_update_string proc~rename rename proc~rename->interface~json_update proc~json_file_update_integer json_file_update_integer proc~json_file_update_integer->interface~json_update proc~json_file_update_string json_file_update_string proc~json_file_update_string->interface~json_update proc~test_1 test_1 proc~test_1->interface~json_update proc~test_10 test_10 proc~test_10->interface~json_update interface~json_create_logical json_create_logical proc~test_10->interface~json_create_logical proc~json_file_update_real json_file_update_real proc~json_file_update_real->interface~json_update proc~json_file_update_logical json_file_update_logical proc~json_file_update_logical->interface~json_update proc~wrap_json_file_update_integer wrap_json_file_update_integer proc~wrap_json_file_update_integer->proc~json_file_update_integer proc~json_file_update_string_name_ascii json_file_update_string_name_ascii proc~json_file_update_string_name_ascii->proc~json_file_update_string proc~wrap_json_file_update_string wrap_json_file_update_string proc~wrap_json_file_update_string->proc~json_file_update_string proc~json_file_update_string_val_ascii json_file_update_string_val_ascii proc~json_file_update_string_val_ascii->proc~json_file_update_string program~jf_test_1 jf_test_1 program~jf_test_1->proc~test_1 program~jf_test_10 jf_test_10 program~jf_test_10->proc~test_10 proc~wrap_json_file_update_real wrap_json_file_update_real proc~wrap_json_file_update_real->proc~json_file_update_real proc~wrap_json_file_update_logical wrap_json_file_update_logical proc~wrap_json_file_update_logical->proc~json_file_update_logical program~jf_test_7 jf_test_7 program~jf_test_7->proc~test_7 proc~wrap_json_value_add_double wrap_json_value_add_double proc~wrap_json_value_add_double->proc~json_value_add_double proc~wrap_json_value_add_logical_vec wrap_json_value_add_logical_vec proc~wrap_json_value_add_logical_vec->proc~json_value_add_logical_vec program~jf_test_12 jf_test_12 program~jf_test_12->proc~test_12 proc~wrap_json_value_add_integer wrap_json_value_add_integer proc~wrap_json_value_add_integer->proc~json_value_add_integer proc~wrap_json_update_double wrap_json_update_double proc~wrap_json_update_double->proc~json_update_double proc~wrap_json_value_add_double_vec wrap_json_value_add_double_vec proc~wrap_json_value_add_double_vec->proc~json_value_add_double_vec program~jf_test_2 jf_test_2 program~jf_test_2->proc~test_2 proc~wrap_json_value_add_integer_vec wrap_json_value_add_integer_vec proc~wrap_json_value_add_integer_vec->proc~json_value_add_integer_vec proc~json_update_string_name_ascii json_update_string_name_ascii proc~json_update_string_name_ascii->proc~json_update_string proc~wrap_json_update_string wrap_json_update_string proc~wrap_json_update_string->proc~json_update_string proc~json_update_string_val_ascii json_update_string_val_ascii proc~json_update_string_val_ascii->proc~json_update_string proc~json_value_add_string_vec_name_ascii json_value_add_string_vec_name_ascii proc~json_value_add_string_vec_name_ascii->proc~json_value_add_string_vec proc~wrap_json_value_add_string_vec wrap_json_value_add_string_vec proc~wrap_json_value_add_string_vec->proc~json_value_add_string_vec proc~json_value_add_string_vec_val_ascii json_value_add_string_vec_val_ascii proc~json_value_add_string_vec_val_ascii->proc~json_value_add_string_vec program~jf_test_4 jf_test_4 program~jf_test_4->proc~test_4 proc~wrap_json_value_add_string wrap_json_value_add_string proc~wrap_json_value_add_string->proc~json_value_add_string proc~json_value_add_string_name_ascii json_value_add_string_name_ascii proc~json_value_add_string_name_ascii->proc~json_value_add_string proc~json_value_add_string_val_ascii json_value_add_string_val_ascii proc~json_value_add_string_val_ascii->proc~json_value_add_string proc~wrap_json_update_logical wrap_json_update_logical proc~wrap_json_update_logical->proc~json_update_logical proc~wrap_json_value_create_logical wrap_json_value_create_logical proc~wrap_json_value_create_logical->proc~json_value_create_logical interface~json_create_logical->proc~json_value_create_logical proc~json_parse_string json_parse_string proc~json_parse_string->proc~parse_value proc~json_parse_file json_parse_file proc~json_parse_file->proc~parse_value proc~wrap_json_parse_string wrap_json_parse_string proc~wrap_json_parse_string->proc~json_parse_string interface~json_parse json_parse interface~json_parse->proc~json_parse_string interface~json_parse->proc~json_parse_file proc~test_14 test_14 proc~test_14->interface~json_parse proc~test_8 test_8 proc~test_8->interface~json_parse proc~json_file_load json_file_load proc~json_file_load->interface~json_parse proc~json_file_load_from_string json_file_load_from_string proc~json_file_load_from_string->interface~json_parse program~jf_test_14 jf_test_14 program~jf_test_14->proc~test_14 program~jf_test_8 jf_test_8 program~jf_test_8->proc~test_8 proc~wrap_json_file_load_from_string wrap_json_file_load_from_string proc~wrap_json_file_load_from_string->proc~json_file_load_from_string
Help

Source Code

    subroutine to_logical(me,val,name)

    implicit none

    type(json_value),intent(inout)               :: me
    logical(LK),intent(in),optional              :: val   !! if the value is also to be set (if not present, then .false. is used).
    character(kind=CK,len=*),intent(in),optional :: name  !! if the name is also to be changed.

    !set type and value:
    call destroy_json_data(me)
    me%var_type = json_logical
    allocate(me%log_value)
    if (present(val)) then
        me%log_value = val
    else
        me%log_value = .false.    !default value
    end if

    !name:
    if (present(name)) me%name = trim(name)

    end subroutine to_logical