[Fortran] 纯文本查看 复制代码
module typedef
implicit none
type ::player
real:: angle
real:: speed
real:: distance
end type
end module
program main
use shoot
implicit none
integer,parameter::players=2
type(player)::people(players)=(/player(30.0,25.0,0.0),player(45.0,20.0,0.0)/)
红色部分为什么不用people
即最后一行代码写成如下形式是错误的:
type(player)::people(players)=(/people(30.0,25.0,0.0),people(45.0,20.0,0.0)/)
|