Fortran Coder

查看: 544|回复: 4
打印 上一主题 下一主题

[求助] abaqus子程序

[复制链接]

3

帖子

1

主题

0

精华

新人

F 币
16 元
贡献
7 点
跳转到指定楼层
楼主
发表于 2024-6-25 13:19:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 sfl233 于 2024-6-26 09:57 编辑

各位,我在abaqus dflux子程序中使用了FORTRAN语言编写程序,由于代码太长,并且需要使用条件语句,我手动换行了一些过长代码,使用的是固定格式.for 但是运行出现很多报错,想求教大家,是因为条件句的问题还是换行格式出现错误。以下是我使用的代码文件和报错信息:(可有偿)

dflux.for(139): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p1x=536.79178377+180.66549224999997*cos(theta)+
---------------------------------------------------------^
dflux.for(140): error #5082: Syntax error, found INTEGER_CONSTANT '71815167' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        155.71815167*sin(theta)
----------------------^
dflux.for(141): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p1y=460.00288594+-155.71815167*cos(theta)+
----------------------------------------------------^
dflux.for(142): error #5082: Syntax error, found INTEGER_CONSTANT '66549224999997' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        180.66549224999997*sin(theta)
----------------------^
dflux.for(144): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p2x=536.79178377+361.33098449999994*cos(theta2)+
----------------------------------------------------------^
dflux.for(145): error #5082: Syntax error, found INTEGER_CONSTANT '43630334' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        311.43630334*sin(theta2)
----------------------^
dflux.for(146): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p2y=460.00288594+-311.43630334*cos(theta2)+
-----------------------------------------------------^
dflux.for(147): error #5082: Syntax error, found INTEGER_CONSTANT '33098449999994' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        361.33098449999994*sin(theta2)
----------------------^
dflux.for(149): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p3x=536.79617234+179.85601854*cos(theta)+
---------------------------------------------------^
dflux.for(150): error #5082: Syntax error, found INTEGER_CONSTANT '17940424' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        158.17940424*sin(theta)
----------------------^
dflux.for(151): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p3y=460.00262335+-158.17940424*cos(theta)+
----------------------------------------------------^
dflux.for(152): error #5082: Syntax error, found INTEGER_CONSTANT '85601854' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        179.85601854*sin(theta)
----------------------^
dflux.for(153): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p3z=15.37940241+0.6227535599999999*cos(theta)+
--------------------------------------------------------^
dflux.for(154): error #5082: Syntax error, found INTEGER_CONSTANT '4790412' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        0.4790412*sin(theta)
--------------------^
dflux.for(185): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          yy = (-21600.0*coords(1)+0.0*coords(2)+
-------------------------------------------------^
dflux.for(186): error #5276: Unbalanced parentheses
         $        21600.0*coords(3)+16368325.4883)**2/933120000.0
-------------------------------------------------^
dflux.for(186): error #5082: Syntax error, found INTEGER_CONSTANT '0' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        21600.0*coords(3)+16368325.4883)**2/933120000.0
------------------------^
dflux.for(258): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p1z=19.90460111+-1.16490346*cos(theta)+
-------------------------------------------------^
dflux.for(262): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p2z=19.90460111+-2.32980692*cos(theta2)+
--------------------------------------------------^
dflux.for(266): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p3z=17.14131056+-1.15149412*cos(theta)+
-------------------------------------------------^
dflux.for(334): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p1x=536.78284533+182.7872826*cos(theta)+
--------------------------------------------------^
dflux.for(335): error #5082: Syntax error, found INTEGER_CONSTANT '97284936' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        158.97284936*sin(theta)
----------------------^
dflux.for(336): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p1y=460.00400221+-158.99707564*cos(theta)+
----------------------------------------------------^
dflux.for(337): error #5082: Syntax error, found INTEGER_CONSTANT '7872826' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        182.7872826*sin(theta)
----------------------^
dflux.for(338): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p1z=19.91096881+-0.92059864*cos(theta)+-
--------------------------------------------------^
dflux.for(339): error #5082: Syntax error, found INTEGER_CONSTANT '70256212' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        0.70256212*sin(theta)
--------------------^
dflux.for(340): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p2x=536.78284533+365.5745652*cos(theta2)+
---------------------------------------------------^
dflux.for(341): error #5082: Syntax error, found INTEGER_CONSTANT '94569872' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        317.94569872*sin(theta2)
----------------------^
dflux.for(342): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
          p2y=460.00400221+-317.99415128*cos(theta2)+
-----------------------------------------------------^
dflux.for(343): error #5082: Syntax error, found INTEGER_CONSTANT '5745652' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
         $        365.5745652*sin(theta2)
----------------------^

十分感谢

dflux.for

26.6 KB, 下载次数: 1

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

2015

帖子

12

主题

5

精华

论坛跑堂

臭石头雪球

F 币
1572 元
贡献
676 点

美女勋章热心勋章星光勋章新人勋章贡献勋章管理勋章帅哥勋章爱心勋章规矩勋章元老勋章水王勋章

沙发
发表于 2024-6-25 14:58:12 | 只看该作者
续行的问题,建议把 TAB 替换成适量的空格,使得续行符严格位于第六列

3

帖子

1

主题

0

精华

新人

F 币
16 元
贡献
7 点
板凳
 楼主| 发表于 2024-6-25 17:21:08 | 只看该作者
fcode 发表于 2024-6-25 14:58
续行的问题,建议把 TAB 替换成适量的空格,使得续行符严格位于第六列

我是这么干的,手动退格,这个报错我将不知道咋改 用notpad++看确实续行符是在第六列

2015

帖子

12

主题

5

精华

论坛跑堂

臭石头雪球

F 币
1572 元
贡献
676 点

美女勋章热心勋章星光勋章新人勋章贡献勋章管理勋章帅哥勋章爱心勋章规矩勋章元老勋章水王勋章

地板
发表于 2024-6-26 10:11:53 | 只看该作者
你看到的第六列不一定在编译器眼里是第六列,因为TAB解释成几列没有标准。所以要先把 TAB 替换成若干个空格

3

帖子

1

主题

0

精华

新人

F 币
16 元
贡献
7 点
5#
 楼主| 发表于 2024-6-26 11:10:42 | 只看该作者
fcode 发表于 2024-6-26 10:11
你看到的第六列不一定在编译器眼里是第六列,因为TAB解释成几列没有标准。所以要先把 TAB 替换成若干个空格 ...

好的 我来试试看  十分感谢
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

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

GMT+8, 2024-11-1 09:26

Powered by Tencent X3.4

© 2013-2024 Tencent

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