错误:符号' iac' AT(1)没有隐式类型;您的意思是NAC&#x27 ;?

发布于 2025-02-13 02:40:25 字数 1374 浏览 0 评论 0原文

我在这件事上有错误,但我不知道为什么它将其检测为没有隐式类型。在编译器中,它说错误:符号'iac'at(1)没有隐式类型;您的意思是“ NAC”?

,但我已经宣布了这样

PROGRAM SUSPAP
! Analysis of Suspension Bridge Structures

IMPLICIT NONE

CHARACTER NJO*70, NCA*70, NAL*70, NDL*70, NAQ*70, NLL*70, NNL*70, NAC*70

REAL*8  ACCE (4000) ,COR (2000) ,DIN (4000) ,DIS (2000) ,DISE (4000) , &
        DISEX (200) ,DISP (4000) ,DIST (2500) ,DIS1 (2000) ,DIS2 (2500) , &
        EFO (14000) ,EFOT (1400) ,ELD(500) ,ELT(500) ,EMOD (1000) , &
        EQFO (14000) ,EQFOT (14000) ,EQLO (2000) ,FORC(2000) ,GDI (2000) , &
        GLO(2000) ,GLOD(100) ,GLOL(100) ,OPR (10000) ,OPS (10000) , &
        PEFF (2000) ,PEQI (2000) ,PEQS (1000) ,PEQT (2000) ,POIS (1000) , &
        PRO(5000) ,ROT (1000) ,SMEG (1000) ,SMEL (1000) ,SMG4 (1000) , &
        STEF (70000) ,STEG (1000) ,STG(70000) ,STEL(1000) , &
        STG4 (1000) ,STRE(1000) ,STMM (70000) ,STMS (10000) , &
        SMMM (70000) ,SMMS (10000) ,VELO(4000) ,WTY (1000) , &
        ACC (4000) ,VEL (4000) ,DAT1 ,DAT2

INTEGER I, LI

DIMENSION   IAC (4000) ,IDE(2, 500) ,INC (2000) ,LISEX (400) ,LTY(1000) , &
            LPOIN (2000) ,MBEL (500) ,MPRI (1000) ,NDON (5, 50) ,NIST (5000) , &
            NLOD (10) ,NMAS (5000) ,NNEL (1000) ,NPRI (1000) ,NTY(1000)

DATA NDI/3/ ,NOE/4/ ,NDN/6/ ,NDE/24/ ,NODEL/10/

i have an error in this thing but I don't know why it detected it as no implicit type. In the compiler it says Error: Symbol 'iac' at (1) has no IMPLICIT type; did you mean 'nac'?

but I already declared it like this

PROGRAM SUSPAP
! Analysis of Suspension Bridge Structures

IMPLICIT NONE

CHARACTER NJO*70, NCA*70, NAL*70, NDL*70, NAQ*70, NLL*70, NNL*70, NAC*70

REAL*8  ACCE (4000) ,COR (2000) ,DIN (4000) ,DIS (2000) ,DISE (4000) , &
        DISEX (200) ,DISP (4000) ,DIST (2500) ,DIS1 (2000) ,DIS2 (2500) , &
        EFO (14000) ,EFOT (1400) ,ELD(500) ,ELT(500) ,EMOD (1000) , &
        EQFO (14000) ,EQFOT (14000) ,EQLO (2000) ,FORC(2000) ,GDI (2000) , &
        GLO(2000) ,GLOD(100) ,GLOL(100) ,OPR (10000) ,OPS (10000) , &
        PEFF (2000) ,PEQI (2000) ,PEQS (1000) ,PEQT (2000) ,POIS (1000) , &
        PRO(5000) ,ROT (1000) ,SMEG (1000) ,SMEL (1000) ,SMG4 (1000) , &
        STEF (70000) ,STEG (1000) ,STG(70000) ,STEL(1000) , &
        STG4 (1000) ,STRE(1000) ,STMM (70000) ,STMS (10000) , &
        SMMM (70000) ,SMMS (10000) ,VELO(4000) ,WTY (1000) , &
        ACC (4000) ,VEL (4000) ,DAT1 ,DAT2

INTEGER I, LI

DIMENSION   IAC (4000) ,IDE(2, 500) ,INC (2000) ,LISEX (400) ,LTY(1000) , &
            LPOIN (2000) ,MBEL (500) ,MPRI (1000) ,NDON (5, 50) ,NIST (5000) , &
            NLOD (10) ,NMAS (5000) ,NNEL (1000) ,NPRI (1000) ,NTY(1000)

DATA NDI/3/ ,NOE/4/ ,NDN/6/ ,NDE/24/ ,NODEL/10/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

简美 2025-02-20 02:40:25

dimension语句声明某物具有(或几个部分具有)尺寸属性。像其他属性规格语句一样,例如分配参数保存dimension语句没有指定<实体的em>类型。

使用隐式无实际上您必须明确声明所有本地变量的类型,而这样做的方法是使用类型声明语句

real*8 iac ! A non-standard type declaration statement
dimension iac(4000)

:代码>并选择了所有Fortran编译器所理解的类型声明。)

可以在单个语句中指定实体的类型及其

real*8, dimension(4000) :: iac ! A non-standard type declaration statement

属性属性分别是属性,

real*8 iac ! Still non-standard
dimension iac(4000)

但需要明确的类型声明以避免隐式键入。

The dimension statement declares that something has (or several somethings have) the DIMENSION attribute. Like other attribute specifications statements, such as allocatable, parameter and save, the dimension statement does not specify a type of an entity.

With implicit none in effect you must explicitly declare the type of all local variables and the way to do that here is to use a type declaration statement:

real*8 iac ! A non-standard type declaration statement
dimension iac(4000)

(You should avoid using real*8 and instead chose a type declaration that is understood by all Fortran compilers.)

It's possible to specify both the type of an entity and its attributes in a single statement

real*8, dimension(4000) :: iac ! A non-standard type declaration statement

or to specify the type and attribute(s) separately

real*8 iac ! Still non-standard
dimension iac(4000)

but an explicit type declaration is required to avoid implicit typing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文