abaqus子程序
本帖最后由 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)
----------------------^
十分感谢
续行的问题,建议把 TAB 替换成适量的空格,使得续行符严格位于第六列 fcode 发表于 2024-6-25 14:58
续行的问题,建议把 TAB 替换成适量的空格,使得续行符严格位于第六列
我是这么干的,手动退格,这个报错我将不知道咋改 用notpad++看确实续行符是在第六列 你看到的第六列不一定在编译器眼里是第六列,因为TAB解释成几列没有标准。所以要先把 TAB 替换成若干个空格 fcode 发表于 2024-6-26 10:11
你看到的第六列不一定在编译器眼里是第六列,因为TAB解释成几列没有标准。所以要先把 TAB 替换成若干个空格 ...
好的 我来试试看十分感谢
页:
[1]