A base class for defining other classes.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | id | = | 0 |
a unique ID code that distinguishes a variable from other variables of the same type. |
|
character(len=name_len), | public | :: | name | = | '' |
the variable name |
==
operator for base_class variables.
To be equal, they must be the same type and have the same ID
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(base_class), | intent(in) | :: | b1 | |||
class(base_class), | intent(in) | :: | b2 |
/=
operator for base_class variables.
To be equal, they must be the same type and have the same ID
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(base_class), | intent(in) | :: | b1 | |||
class(base_class), | intent(in) | :: | b2 |
==
operator for base_class variables.
To be equal, they must be the same type and have the same ID
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(base_class), | intent(in) | :: | b1 | |||
class(base_class), | intent(in) | :: | b2 |
/=
operator for base_class variables.
To be equal, they must be the same type and have the same ID
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(base_class), | intent(in) | :: | b1 | |||
class(base_class), | intent(in) | :: | b2 |
type,abstract,public :: base_class !! A base class for defining other classes. integer :: id = 0 !! a unique ID code that distinguishes a !! variable from other variables of the same type. character(len=name_len) :: name = '' !! the variable name contains generic,public :: operator(==) => base_class_equal generic,public :: operator(/=) => base_class_not_equal procedure,private :: base_class_equal procedure,private :: base_class_not_equal end type base_class