aot_out_close_table Subroutine

public subroutine aot_out_close_table(put_conf, advance_previous)

Close the current table.

The table on the current table is closed with a curly bracket. If this bracket should be put to the same line as the last entry of the table, you have to set advance_previous = .false.

Arguments

Type IntentOptional Attributes Name
type(aot_out_type), intent(inout) :: put_conf
logical, intent(in), optional :: advance_previous

Called by

proc~~aot_out_close_table~~CalledByGraph proc~aot_out_close_table aot_out_close_table proc~aot_out_val_arr_double aot_out_val_arr_double proc~aot_out_val_arr_double->proc~aot_out_close_table interface~aot_out_val~2 aot_out_val proc~aot_out_val_arr_double->interface~aot_out_val~2 proc~aot_out_val_arr_extdouble aot_out_val_arr_extdouble proc~aot_out_val_arr_extdouble->proc~aot_out_close_table proc~aot_out_val_arr_extdouble->interface~aot_out_val~2 proc~aot_out_val_arr_int aot_out_val_arr_int proc~aot_out_val_arr_int->proc~aot_out_close_table proc~aot_out_val_arr_int->interface~aot_out_val~2 proc~aot_out_val_arr_logical aot_out_val_arr_logical proc~aot_out_val_arr_logical->proc~aot_out_close_table proc~aot_out_val_arr_logical->interface~aot_out_val~2 proc~aot_out_val_arr_long aot_out_val_arr_long proc~aot_out_val_arr_long->proc~aot_out_close_table proc~aot_out_val_arr_long->interface~aot_out_val~2 proc~aot_out_val_arr_quadruple aot_out_val_arr_quadruple proc~aot_out_val_arr_quadruple->proc~aot_out_close_table interface~aot_out_val aot_out_val proc~aot_out_val_arr_quadruple->interface~aot_out_val proc~aot_out_val_arr_real aot_out_val_arr_real proc~aot_out_val_arr_real->proc~aot_out_close_table proc~aot_out_val_arr_real->interface~aot_out_val~2 proc~aot_out_val_arr_string aot_out_val_arr_string proc~aot_out_val_arr_string->proc~aot_out_close_table proc~aot_out_val_arr_string->interface~aot_out_val~2 interface~aot_out_val->proc~aot_out_val_arr_quadruple interface~aot_out_val~2->proc~aot_out_val_arr_extdouble interface~aot_out_val~3 aot_out_val interface~aot_out_val~3->proc~aot_out_val_arr_double interface~aot_out_val~3->proc~aot_out_val_arr_int interface~aot_out_val~3->proc~aot_out_val_arr_logical interface~aot_out_val~3->proc~aot_out_val_arr_long interface~aot_out_val~3->proc~aot_out_val_arr_real interface~aot_out_val~3->proc~aot_out_val_arr_string

Source Code

  subroutine aot_out_close_table(put_conf, advance_previous)
    !------------------------------------------------------------------------
    type(aot_out_type), intent(inout)  :: put_conf
    logical, optional, intent(in) :: advance_previous
    !------------------------------------------------------------------------
    logical :: loc_adv_prev
    character(len=max(put_conf%indent-put_conf%in_step,0)) :: indent
    character(len=3) :: adv_string
    !------------------------------------------------------------------------

    indent = ''
    adv_string = 'yes'

    if (present(advance_previous)) then
      loc_adv_prev = advance_previous
    else
      loc_adv_prev = .true.
    end if

    put_conf%indent = max(put_conf%indent - put_conf%in_step, 0)
    put_conf%stack(put_conf%level) = 0
    put_conf%level = max(put_conf%level - 1, 0)

    if (put_conf%level > 0) then
      ! Do not advance, to let the next entry append the separator to the line.
      adv_string = 'no'
    end if

    ! Close last entry without separator.
    if (loc_adv_prev) then
      ! Closing brace should be on new line.
      write(put_conf%outunit,*) ''
      write(put_conf%outunit, fmt="(a)", advance=adv_string) indent//'}'
    else
      ! Closing brace on same line as last entry.
      write(put_conf%outunit, fmt="(a)", advance=adv_string) ' }'
    end if

  end subroutine aot_out_close_table