39 type(type_t),
public :: TYPE_NONE =
type_t(0)
40 type(type_t),
public :: TYPE_FLOAT =
type_t(1)
41 type(type_t),
public :: TYPE_CMPLX =
type_t(2)
42 type(type_t),
public :: TYPE_INTEGER =
type_t(3)
43 type(type_t),
public :: TYPE_BYTE =
type_t(4)
44 type(type_t),
public :: TYPE_INTEGER8 =
type_t(5)
46 interface operator(==)
48 end interface operator(==)
50 interface operator(/=)
52 end interface operator(/=)
54 integer :: sizes(5) = (/8, 16, 4, 1, 8/)
58 integer pure function types_get_size(this) result(size)
59 type(type_t),
intent(in) :: this
61 size = sizes(this%itype)
66 logical pure function types_equal(ta, tb) result(equal)
67 type(type_t),
intent(in) :: ta
68 type(type_t),
intent(in) :: tb
70 equal = ta%itype == tb%itype
76 logical pure function types_not_equal(ta, tb) result(equal)
77 type(type_t),
intent(in) :: ta
78 type(type_t),
intent(in) :: tb
80 equal = ta%itype /= tb%itype
86 logical pure function type_is_complex(this) result(is_complex)
87 type(type_t),
intent(in) :: this
logical pure function types_equal(ta, tb)
type(type_t), public type_cmplx
logical pure function types_not_equal(ta, tb)
logical pure function, public type_is_complex(this)
integer pure function, public types_get_size(this)