aot_out_breakline Subroutine

public subroutine aot_out_breakline(put_conf, advance_previous)

This subroutine takes care of the proper linebreaking in Lua-Tables.

It takes care of a proper line-continuation, depending on the optional advance_previous flag and increases the count of elements in the current table. The default is to put each entry on a new line, if it should be on the same line advance_previous = .false. has to be set.

Arguments

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

Called by

proc~~aot_out_breakline~~CalledByGraph proc~aot_out_breakline aot_out_breakline proc~aot_out_open_table aot_out_open_table proc~aot_out_open_table->proc~aot_out_breakline proc~aot_out_val_double aot_out_val_double proc~aot_out_val_double->proc~aot_out_breakline proc~aot_out_val_extdouble aot_out_val_extdouble proc~aot_out_val_extdouble->proc~aot_out_breakline proc~aot_out_val_int aot_out_val_int proc~aot_out_val_int->proc~aot_out_breakline proc~aot_out_val_logical aot_out_val_logical proc~aot_out_val_logical->proc~aot_out_breakline proc~aot_out_val_long aot_out_val_long proc~aot_out_val_long->proc~aot_out_breakline proc~aot_out_val_quadruple aot_out_val_quadruple proc~aot_out_val_quadruple->proc~aot_out_breakline proc~aot_out_val_real aot_out_val_real proc~aot_out_val_real->proc~aot_out_breakline proc~aot_out_val_string aot_out_val_string proc~aot_out_val_string->proc~aot_out_breakline interface~aot_out_val aot_out_val interface~aot_out_val->proc~aot_out_val_double interface~aot_out_val->proc~aot_out_val_int interface~aot_out_val->proc~aot_out_val_logical interface~aot_out_val->proc~aot_out_val_long interface~aot_out_val->proc~aot_out_val_real interface~aot_out_val->proc~aot_out_val_string proc~aot_out_val_arr_double aot_out_val_arr_double interface~aot_out_val->proc~aot_out_val_arr_double proc~aot_out_val_arr_int aot_out_val_arr_int interface~aot_out_val->proc~aot_out_val_arr_int proc~aot_out_val_arr_logical aot_out_val_arr_logical interface~aot_out_val->proc~aot_out_val_arr_logical proc~aot_out_val_arr_long aot_out_val_arr_long interface~aot_out_val->proc~aot_out_val_arr_long proc~aot_out_val_arr_real aot_out_val_arr_real interface~aot_out_val->proc~aot_out_val_arr_real proc~aot_out_val_arr_string aot_out_val_arr_string interface~aot_out_val->proc~aot_out_val_arr_string interface~aot_out_val~2 aot_out_val interface~aot_out_val~2->proc~aot_out_val_extdouble proc~aot_out_val_arr_extdouble aot_out_val_arr_extdouble 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_quadruple proc~aot_out_val_arr_quadruple aot_out_val_arr_quadruple interface~aot_out_val~3->proc~aot_out_val_arr_quadruple proc~aot_out_val_arr_double->proc~aot_out_open_table proc~aot_out_val_arr_double->interface~aot_out_val~2 proc~aot_out_val_arr_extdouble->proc~aot_out_open_table proc~aot_out_val_arr_extdouble->interface~aot_out_val~2 proc~aot_out_val_arr_int->proc~aot_out_open_table proc~aot_out_val_arr_int->interface~aot_out_val~2 proc~aot_out_val_arr_logical->proc~aot_out_open_table proc~aot_out_val_arr_logical->interface~aot_out_val~2 proc~aot_out_val_arr_long->proc~aot_out_open_table proc~aot_out_val_arr_long->interface~aot_out_val~2 proc~aot_out_val_arr_quadruple->proc~aot_out_open_table proc~aot_out_val_arr_quadruple->interface~aot_out_val~3 proc~aot_out_val_arr_real->proc~aot_out_open_table proc~aot_out_val_arr_real->interface~aot_out_val~2 proc~aot_out_val_arr_string->proc~aot_out_open_table proc~aot_out_val_arr_string->interface~aot_out_val~2

Source Code

  subroutine aot_out_breakline(put_conf, advance_previous)
    type(aot_out_type), intent(inout)  :: put_conf
    logical, optional, intent(in) :: advance_previous

    character(len=put_conf%indent) :: indent
    character :: sep
    logical :: loc_adv_prev

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

    lev_if: if (put_conf%level > 0) then

      if (put_conf%stack(put_conf%level) > 0) then
        ! Use the separator to close the previous entry.
        sep = ','
      else
        ! First entry, nothing to separate yet.
        sep = ''
      end if

      if (loc_adv_prev) then
        write(put_conf%outunit, fmt='(a)') trim(sep)
        write(put_conf%outunit, fmt='(a)', advance='no') indent
      else
        write(put_conf%outunit, fmt='(a)', advance='no') trim(sep)//" "
      end if

      put_conf%stack(put_conf%level) = put_conf%stack(put_conf%level) + 1

    else if (put_conf%level .eq. 0)then
      write(put_conf%outunit, fmt='(a)', advance='no') " "
    end if lev_if

  end subroutine aot_out_breakline