type(person),pointer::p(:)
type(person),target::pp(5)=(/此处赋值省略/)
p=>pp
type pperson
type(person),pointer::p
end type
if(p(i)%p%height<p(j)%p%height) then
temp=p(i)
p(i)=p(j)
p(j)=temp
end if
if(p(i)%height<p(j)%height) then
temp=>p(i)
p(i)=>p(j)
p(j)=>temp
end if
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |