fixed_list_t Derived Type

type, public :: fixed_list_t

Type for a fixed list, that can be used as a list of lists


Components

Type Visibility Attributes Name Initial
integer(kind=i4), public :: initial_index

Metadata

integer(kind=i4), public :: final_index

Metadata

integer(kind=i4), public :: n = 0
integer(kind=i4), public, allocatable :: list(:)
type(fixed_list_t), public, pointer :: next
type(fixed_list_t), public, pointer :: prev

Finalization Procedures

final :: finalize_fixed_list

  • private subroutine finalize_fixed_list(this)

    Finalize the list

    Arguments

    Type IntentOptional Attributes Name
    type(fixed_list_t), intent(inout) :: this

Type-Bound Procedures

procedure, public :: init => fixed_list_init

  • private subroutine fixed_list_init(this, i1, i2)

    Initialize the fixed list Input: i1 - initial index, i2 - final index If i2 is not present, i1 is used as the size (final index)

    Arguments

    Type IntentOptional Attributes Name
    class(fixed_list_t), intent(inout) :: this
    integer(kind=i4), intent(in) :: i1
    integer(kind=i4), intent(in), optional :: i2

procedure, public :: sum => fixed_list_sum

  • private function fixed_list_sum(this) result(val)

    Sum the elements of the fixed list

    Arguments

    Type IntentOptional Attributes Name
    class(fixed_list_t), intent(in) :: this

    Return Value integer(kind=i4)

procedure, public :: print => fixed_list_print

  • private subroutine fixed_list_print(this)

    Print the fixed list

    Arguments

    Type IntentOptional Attributes Name
    class(fixed_list_t), intent(in) :: this