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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(text_buffer), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in), | dimension(:) | :: | x |
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