kelker Posted May 2, 2008 at 03:54 PM Report Share #183037 Posted May 2, 2008 at 03:54 PM Boas. Estou a fazer um programa em fortran (é confidencial, portanto não peçam para colocar aqui o programa), mas não estou a gostar muito dos erros que me têm aparecido, exactamente porque eu não os consigo ver!! Deixo aqui o relato de erros: fortcom: Error: evolution.f, line 111: Syntax error, found IDENTIFIER 'OI' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ... do i=1,np ------^ fortcom: Error: evolution.f, line 111: Syntax error, found END-OF-STATEMENT when expecting one of: = .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ... do i=1,np --------------^ Existe imediatamente antes deste ciclo, um outro que começa exactamente do mesmo modo - o outro não dá erro, este dá! fortcom: Error: evolution.f, line 123: Syntax error, found IDENTIFIER 'NDDOINT' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ... enddo ------^ fortcom: Error: evolution.f, line 111: An equals sign (=) is invalid in this context. [OI] do i=1,np ------^ fortcom: Error: evolution.f, line 109: The number of subscripts is incorrect. [W] xint(np*dim2+1:np*nvar) = w(1:np*dimR) --------------------------------^ Esta mesma linha de código já existia antes de dar erros - agora deu, porquê? A única diferença é que aumentei o xint (e declarei esse aumento). fortcom: Error: evolution.f, line 123: This name does not have a type, and must have an explicit type. [NDDOINT] enddo ------^ fortcom: Error: evolution.f, line 123: A substring must be of type CHARACTER. [NDDOINT] enddo ------^ Este aparece várias vezes... Que mal tem o "enddo"??? E porquê este? O programa tem talvez centenas de 'enddo', mas isto só implica com uns quantos... o.0 (Verifiquei que todos os 'do' iniciados, são concluídos... fortcom: Error: evolution.f, line 124: A CHARACTER data type is required in this context. [L] xint(np*nvar+1:(np*nvar+np)) = L(1:np) !L é guardado no final do vector xint ------------------------------------^ fortcom: Error: evolution.f, line 123: The shapes of the array expressions do not conform. [NDDOINT] enddo ------^ fortcom: Error: evolution.f, line 202: Syntax error, found END-OF-STATEMENT when expecting one of: = .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ... double precision const(npmax),DeT,KK(npmax*dim),II(npmax*dim),JJ(npmax*dim) ---------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 203: Syntax error, found END-OF-STATEMENT when expecting one of: ( * <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ... double precision rvr(npmax*dim),rxv(npmax*dim),wijk(npmax*dim),rw(dim) ----------------------------------------------------------------------------^ O que está errado com estas declarações??? fortcom: Error: evolution.f, line 261: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... rxv(1+(i-1)*dim)= xi(2+(i-1)*dim)*xi(3+(i-1+np)*dim)-xi(3+(i-1)*dim)*xi(2+(i-1+np)*dim) -----------------------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 262: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... rxv(2+(i-1)*dim)= xi(1+(i-1)*dim)*xi(3+(i-1+np)*dim)-xi(3+(i-1)*dim)*xi(1+(i-1+np)*dim) --------------------------------------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 263: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... rxv(3+(i-1)*dim)= xi(1+(i-1)*dim)*xi(2+(i-1+np)*dim)-xi(2+(i-1)*dim)*xi(1+(i-1+np)*dim) -----------------------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 269: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... II(1+(i-1)*dim)=rxv(2+(i-1)*dim)/sqrt((rxv(2+(i-1)*dim))**2+(rxv(1+(i-1)*dim))**2) -------------------------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 270: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... II(2+(i-1)*dim)=rxv(1+(i-1)*dim)/sqrt((rxv(2+(i-1)*dim))**2+(rxv(1+(i-1)*dim))**2) --------------------------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 278: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... wijk(u+(i-1)*dim)= x1*sqrt(1-x2**2)*cos(x3)*II(u+(i-1)*dim) ----------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 279: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM TYPE COMPLEX BYTE CHARACTER ... & +x1*sqrt(1-x2**2)*sin(x3)*JJ(u+(i-1)*dim) -------------^ fortcom: Error: evolution.f, line 279: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... & +x1*sqrt(1-x2**2)*sin(x3)*JJ(u+(i-1)*dim) ----------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 280: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM TYPE COMPLEX BYTE CHARACTER ... & +x1*x2*KK(u+(i-1)*dim) -------------^ fortcom: Error: evolution.f, line 287: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ... a(u+(i-1)*dim)=a(u+(i-1)*dim) + const(i)*(rvr+rw(u)+xi(u+(i-1+np)*dim) -------------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 481: Syntax error, found END-OF-STATEMENT when expecting one of: :: , : ) DL(u)=const*(wr(i)*xi(u+(i-1)*dim)-(r(i)**2)*wijk(u+(i-1)*dim)+rxv(u+(i-1)*dim)) -----------------------------------------------------------------------------------------------^ fortcom: Error: evolution.f, line 280: A character expression is expected as a format specifier & +x1*x2*KK(u+(i-1)*dim) -----------------------------------^ fortcom: Error: evolution.f, line 280: A scalar default-integer variable is required in this context. & +x1*x2*KK(u+(i-1)*dim) -----------------------------------^ fortcom: Error: evolution.f, line 283: This name has not been declared as an array or a function. [RW] rw(1)=xi(2+(i-1)*dim)*wijk(3+(i-1)*dim)-xi(3+(i-1)*dim)*wijk(2+(i-1)*dim) ------------^ fortcom: Error: evolution.f, line 283: The shapes of the array expressions do not conform. [RW] rw(1)=xi(2+(i-1)*dim)*wijk(3+(i-1)*dim)-xi(3+(i-1)*dim)*wijk(2+(i-1)*dim) ------------^ fortcom: Error: evolution.f, line 284: This name has not been declared as an array or a function. [RW] rw(2)=xi(3+(i-1)*dim)*wijk(1+(i-1)*dim)-xi(1+(i-1)*dim)*wijk(3+(i-1)*dim) ------------^ fortcom: Error: evolution.f, line 284: The shapes of the array expressions do not conform. [RW] rw(2)=xi(3+(i-1)*dim)*wijk(1+(i-1)*dim)-xi(1+(i-1)*dim)*wijk(3+(i-1)*dim) ------------^ fortcom: Error: evolution.f, line 285: This name has not been declared as an array or a function. [RW] rw(3)=xi(1+(i-1)*dim)*wijk(2+(i-1)*dim)-xi(2+(i-1)*dim)*wijk(1+(i-1)*dim) ------------^ fortcom: Error: evolution.f, line 285: The shapes of the array expressions do not conform. [RW] rw(3)=xi(1+(i-1)*dim)*wijk(2+(i-1)*dim)-xi(2+(i-1)*dim)*wijk(1+(i-1)*dim) ------------^ fortcom: Severe: Too many errors, exiting rw foi definido!! Agradecia que me dissessem a que se referem os erros, pelo menos alguns deles... (Possivelmente alguns são básicos, mas eu nunca aprendi fortran, estou a usar pela primeira vez...) kelker Link to comment Share on other sites More sharing options...
kelker Posted May 12, 2008 at 11:46 AM Author Report Share #184650 Posted May 12, 2008 at 11:46 AM Podem fechar, já resolvi tudo. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now