| 如果你的 isal , medium 可能的取值是连续的。可以尝试用数组表来代替 select 
 [Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode program select
  integer :: medium = 1 , isal = 1
  real :: ew
  call DIEL_WAT(medium, isal, ew)
  write(*,*) ew, isal
end program select
subroutine DIEL_WAT(medium, isal, ew)
  Integer , parameter :: AList(0:*) = [0,20,40]
  Integer , parameter :: BList(0:*) = [0,1,2]
  iNTEGER medium,isal
  real ew
  ew = AList(isal)+BList(medium)
end subroutine DIEL_WAT |