add_real_list Subroutine

private pure subroutine add_real_list(me, x)

Append a list of real numbers, separated by commas (x1, x2, ...: the contents of a JSON array, for writing a large array in pieces).

Type Bound

text_buffer

Arguments

Type IntentOptional Attributes Name
class(text_buffer), intent(inout) :: me
real(kind=wp), intent(in), dimension(:) :: x

Calls

proc~~add_real_list~~CallsGraph proc~add_real_list text_buffer%add_real_list proc~add_real text_buffer%add_real proc~add_real_list->proc~add_real proc~add_str text_buffer%add_str proc~add_real_list->proc~add_str proc~reserve text_buffer%reserve proc~add_real_list->proc~reserve proc~add_real->proc~add_str proc~add_real->proc~reserve proc~add_digits add_digits proc~add_real->proc~add_digits proc~scaled scaled proc~add_real->proc~scaled proc~add_str->proc~reserve proc~add_digits->proc~add_str proc~two_prod two_prod proc~scaled->proc~two_prod proc~split split proc~two_prod->proc~split

Called by

proc~~add_real_list~~CalledByGraph proc~add_real_list text_buffer%add_real_list proc~add_real_array text_buffer%add_real_array proc~add_real_array->proc~add_real_list proc~write_json_real_array write_json_real_array proc~write_json_real_array->proc~add_real_list proc~generate_eclipse_data mission_type%generate_eclipse_data proc~generate_eclipse_data->proc~write_json_real_array proc~segment_trajectory_json segment_trajectory_json proc~segment_trajectory_json->proc~add_real_array proc~export_trajectory_json_file mission_type%export_trajectory_json_file proc~export_trajectory_json_file->proc~segment_trajectory_json proc~halo_solver_main halo_solver_main proc~halo_solver_main->proc~generate_eclipse_data proc~halo_solver_main->proc~export_trajectory_json_file

Source Code

    pure subroutine add_real_list(me, x)

    class(text_buffer),intent(inout) :: me
    real(wp),dimension(:),intent(in) :: x

    integer :: i

    call me%reserve(26*size(x))  ! (at most 24 characters per number, plus ", ")
    do i = 1, size(x)
        if (i > 1) call me%add_str(', ')
        call me%add_real(x(i))
    end do

    end subroutine add_real_list