From d4cce043d079bca01b4c7629696e73f315e3207e Mon Sep 17 00:00:00 2001 From: zoziha Date: Tue, 9 Nov 2021 19:37:00 +0800 Subject: [PATCH] Fix CI error: remove `module` keyword in submodule. --- src/stdlib_io.fypp | 33 ++++++++++++++++----------------- src/stdlib_io_disp.fypp | 6 +++--- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/stdlib_io.fypp b/src/stdlib_io.fypp index 79bd493be..2b7001eeb 100644 --- a/src/stdlib_io.fypp +++ b/src/stdlib_io.fypp @@ -32,30 +32,29 @@ module stdlib_io !> version: experimental !> - !> Display a scalar, vector or matrix. - !> ([Specification](../page/specs/stdlib_io.html#disp-display-your-data)) - #! Displays a scalar or array value nicely + !> Display a scalar, vector or matrix formatted. + !> ([Specification](../page/specs/stdlib_io.html#display-the-value-of-the-vairable)) interface disp #:set ALL_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES + LOG_KINDS_TYPES + STRING_KINDS_TYPES module subroutine disp_char(x, header, unit, brief, format, width, sep) - character(*), intent(in), optional :: x - character(len=*), intent(in), optional :: header - integer, intent(in), optional :: unit - logical, intent(in), optional :: brief - character(len=*), intent(in), optional :: format - integer, intent(in), optional :: width - character(len=*), intent(in), optional :: sep + character(*), intent(in), optional :: x + character(len=*), intent(in), optional :: header + integer, intent(in), optional :: unit + logical, intent(in), optional :: brief + character(len=*), intent(in), optional :: format + integer, intent(in), optional :: width + character(len=*), intent(in), optional :: sep end subroutine disp_char #:for r1 in range(0, 3) #:for k1, t1 in ALL_KINDS_TYPES module subroutine disp_${r1}$_${t1[0]}$${k1}$(x, header, unit, brief, format, width, sep) - ${t1}$, intent(in) :: x${ranksuffix(r1)}$ - character(len=*), intent(in), optional :: header - integer, intent(in), optional :: unit - logical, intent(in), optional :: brief - character(len=*), intent(in), optional :: format - integer, intent(in), optional :: width - character(len=*), intent(in), optional :: sep + ${t1}$, intent(in) :: x${ranksuffix(r1)}$ + character(len=*), intent(in), optional :: header + integer, intent(in), optional :: unit + logical, intent(in), optional :: brief + character(len=*), intent(in), optional :: format + integer, intent(in), optional :: width + character(len=*), intent(in), optional :: sep end subroutine disp_${r1}$_${t1[0]}$${k1}$ #:endfor #:endfor diff --git a/src/stdlib_io_disp.fypp b/src/stdlib_io_disp.fypp index c8d51fb66..928e85fc4 100644 --- a/src/stdlib_io_disp.fypp +++ b/src/stdlib_io_disp.fypp @@ -32,7 +32,7 @@ contains integer :: unit_, width_#{if r1 == 2}#, max_elem_len#{endif}# logical :: brief_ character(len=:), allocatable :: format_, sep_ - #{if r1 != 0 or (r1 == 1 and k1 != "string_type")}#integer :: i#{endif}# + #{if r1 != 0 and not(r1 == 1 and k1 == "string_type")}#integer :: i#{endif}# #{if r1 == 2 and k1 != "string_type"}#integer :: j#{endif}# #{if k1 != "string_type"}#type(string_type), allocatable :: x_str${ranksuffix(r1)}$#{endif}# #{if r1 != 0}#type(string_type) :: array_info#{endif}# @@ -263,7 +263,7 @@ contains end function format_output_string !> Print array infomation - pure type(string_type) module function array_info_maker(m, n) result(info) + pure type(string_type) function array_info_maker(m, n) result(info) integer, intent(in) :: m integer, intent(in), optional :: n @@ -276,7 +276,7 @@ contains end function array_info_maker !> Display `character(*)` value. - module subroutine disp_char(x, header, unit, brief, format, width, sep) + subroutine disp_char(x, header, unit, brief, format, width, sep) character(*), intent(in), optional :: x character(len=*), intent(in), optional :: header