-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Something so we can avoid these annoying nested select type blocks.
So if you want to check if several variables are integers:
! if several variables are integers
select type (a,b,c) ! new syntax
class is (integer)
d = a + b + c
end selectOr if you want to check if a variable is any integer kind:
select type (a)
class is (integer(kind=*)) ! new syntax
d = a * 2
end selectOr any numeric kind:
select type (a)
class is (integer(kind=*), real(kind=*)) ! new syntax
d = 1 * 2
end selectAnd all together:
select type (a,b,c) ! new syntax
class is (integer(kind=*), real(kind=*)) ! new syntax
! a, b, and c are all either integers or reals,
! so compiler knows what to do here:
d = a + b + c
end selectszaghi and zbeekmanszaghizbeekman and szaghi
Metadata
Metadata
Assignees
Labels
No labels