dm_person Module

Module for handling natural persons.


Used by

  • module~~dm_person~~UsedByGraph module~dm_person dm_person module~dm_mail dm_mail module~dm_mail->module~dm_person module~dmpack dmpack module~dmpack->module~dm_person module~dmpack->module~dm_mail

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: PERSON_NAME_LEN = 80

Max. name length.

integer, public, parameter :: PERSON_MAIL_LEN = 80

Max. address length.

integer, public, parameter :: PERSON_PHONE_LEN = 80

Max. phone number length


Interfaces

public interface operator (==)

Returns whether persons are equal.

  • public pure elemental function dm_person_equals(person1, person2) result(equals)

    Returns .true. if both persons are equal.

    Arguments

    Type IntentOptional Attributes Name
    type(person_type), intent(in) :: person1

    First person.

    type(person_type), intent(in) :: person2

    Second person.

    Return Value logical


Derived Types

type, public ::  person_type

Person type to store name and contact details.

Components

Type Visibility Attributes Name Initial
character(len=PERSON_NAME_LEN), public :: name = ' '

Person name.

character(len=PERSON_MAIL_LEN), public :: mail = ' '

Person e-mail address.

character(len=PERSON_PHONE_LEN), public :: phone = ' '

Person phone number.


Functions

public pure elemental function dm_person_equals(person1, person2) result(equals)

Returns .true. if both persons are equal.

Arguments

Type IntentOptional Attributes Name
type(person_type), intent(in) :: person1

First person.

type(person_type), intent(in) :: person2

Second person.

Return Value logical

public pure elemental function dm_person_has_mail(person) result(has)

Returns .true. if the person has a e-mail address.

Arguments

Type IntentOptional Attributes Name
type(person_type), intent(in) :: person

Person type.

Return Value logical

public pure elemental function dm_person_has_name(person) result(has)

Returns .true. if the person has a name.

Arguments

Type IntentOptional Attributes Name
type(person_type), intent(in) :: person

Person type.

Return Value logical