Fortran Coder

查看: 9709|回复: 2
打印 上一主题 下一主题

[求助] fortran95上一模一样敲上去的报错

[复制链接]

6

帖子

3

主题

0

精华

熟手

fresh

F 币
195 元
贡献
53 点

规矩勋章

QQ
跳转到指定楼层
楼主
发表于 2015-12-30 20:08:51 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
新手入门,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  


分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

712

帖子

4

主题

0

精华

大师

农村外出务工人员

F 币
607 元
贡献
311 点

新人勋章爱心勋章水王勋章元老勋章热心勋章

沙发
发表于 2015-12-30 21:02:35 | 只看该作者
第四行
character(len=30) :; name
改为
character(len=30) :: name

即,第二个冒号打成了分号

6

帖子

3

主题

0

精华

熟手

fresh

F 币
195 元
贡献
53 点

规矩勋章

QQ
板凳
 楼主| 发表于 2015-12-30 21:06:50 | 只看该作者
.-.-
  3Q3Q~  多谢了,我找了那么久竟然没发现。。。。呜呜呜
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-5-4 01:08

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表