新手入门,fortran95上一模一样敲上去的报错,code如下:[Fortran] 纯文本查看 复制代码
program ex0432
implicit none
type :: person
character(len=30) :; name
integer :: age
integer :: height
integer :: weight
character(len=80) :: address
end type person
type(person) :: a
write(*,*) "NAME:"
read(*,*) a%name
write(*,*) "AGE:"
read(*,*) a%age
write(*,*) "height:"
read(*,*) a%height
write(*,*) "weight:"
read(*,*) a%weight
write(*,*) "address:"
read(*,"(a80)") a%address
write(*,100) a%name,a%age,a%height,a%weight,a%address
100 format(/,"name:",a10/,"age:",i3/,"height:",i3/,"weight:",i3/,"address:",a50)
stop
end
|