create_markdown_table Program

Uses

  • program~~create_markdown_table~~UsesGraph program~create_markdown_table create_markdown_table iso_c_binding iso_c_binding program~create_markdown_table->iso_c_binding iso_fortran_env iso_fortran_env program~create_markdown_table->iso_fortran_env module~julienne_string_m julienne_string_m program~create_markdown_table->module~julienne_string_m module~julienne_string_m->iso_c_binding

This program demonstrates the creation of a Markdown table summarzing kind values used by a compiler:

  1. Using the string_t user-defined structure constructor to encapsulate a ragged-edged string_t array.
  2. Using operator(.separatedBy.) to concatenate string_t array elements with interspersed separators.
  3. Using the elemental type-bound procedure "bracket" to prefix and suffix string_t array elements.

Running the program with a command of the form "fpm run --example create-markdown-table" without quotes should produce a table similar to the following with "flang" replaced by the employed compiler's name.

compiler \ kind default c_size_t c_int64_t c_intptr_t
flang 4 8 8 8

Calls

program~~create_markdown_table~~CallsGraph program~create_markdown_table create_markdown_table body body program~create_markdown_table->body header header program~create_markdown_table->header proc~compiler compiler program~create_markdown_table->proc~compiler proc~markdown_table markdown_table program~create_markdown_table->proc~markdown_table string string program~create_markdown_table->string table_lines table_lines program~create_markdown_table->table_lines interface~bracket string_t%bracket proc~markdown_table->interface~bracket

Functions

pure function compiler()

Arguments

None

Return Value type(string_t)

pure function markdown_table(row_header, column_header, body_cells, side_borders) result(lines)

Arguments

Type IntentOptional Attributes Name
type(string_t), intent(in) :: row_header(first_body_row:)
type(string_t), intent(in) :: column_header(:)
type(string_t), intent(in) :: body_cells(first_body_row:,:)
logical, intent(in) :: side_borders

Return Value type(string_t), (size(body_cells,1)+rank(column_header)+num_rule_lines)