INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Fortran error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * )

Fortran error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * )

Fortran error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * )

(OP)
Hello,
I have done the following Fortran code(.f)


C Copy the material feed variables into the table. Data for
C each material stream will be placed in separate columns.
C NMATI equals the number of material feeds.
K1 = NUM_ROWS-2
K2 = NUM_ROWS-1
NUM_COLS = NMATI
DO J=1, NUM_COLS
OFFSET = (J-1)*(NCOMP_NCC+12)
DO I=1, NUM_ROWS
IF (I .EQ. K1) then
CALL SHS_CPACK(MSIN(1,J), NCP, IDX, Y, FLOW)
KDIAG=4
K= NCOMP_NCC
CALL PPMON_VISCV(MSIN(K+2,J), MSIN(K+3,J), Y, NCP,
+ IDX, NBOPST, KDIAG,
+ INSTREAM(OFFSET+I), RETCODE)
ELSE
IF (I .EQ. K2) then
CALL SHS_CPACK(MSIN(1,J), NCP, IDX, Y, FLOW)
KDIAG=4
K= NCOMP_NCC
CALL PPMON_TCONV(MSIN(K+2,J), MSIN(K+3,J), Y, NCP,
+ IDX, NBOPST, KDIAG,
+ INSTREAM(OFFSET+I), RETCODE)
ELSE
IF (I .EQ. NUM_ROWS) then
CALL SHS_CPACK(MSIN(1,J), NCP, IDX, Y, FLOW)
K= NCOMP_NCC
KDIAG=4
KH=2
KV=3
CALL PPMON_VMTHRM(MSIN(K+2,J), MSIN(K+3,J), Y,
+ NCP,IDX, NBOPST, KDIAG, KBASE, KPHI, KH, KS,
+ KG, KV, PHI, HMX, SMX, GMX, VMX, DPHI, CPMX,
+ DSMX, DGMX, DVMX, KER)
ELSE
INSTREAM(OFFSET+I) = MSIN(I,J)
END IF
END DO
END DO

But when I try to compile there is this error message:

mem2.f(145): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
CALL PPMON_VISCV(MSIN(K+2,J), MSIN(K+3,J), Y, NCP,
------------------------------------------------------------^
mem2.f(146): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
+ IDX, NBOPST, KDIAG,
-----------------------------------^
mem2.f(147): error #5276: Unbalanced parentheses
+ INSTREAM(OFFSET+I), RETCODE)
------------------------------------------^
mem2.f(153): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
CALL PPMON_TCONV(MSIN(K+2,J), MSIN(K+3,J), Y, NCP,
-------------------------------------------------------------^
mem2.f(154): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
+ IDX, NBOPST, KDIAG,
-----------------------------------^
mem2.f(155): error #5276: Unbalanced parentheses
+ INSTREAM(OFFSET+I), RETCODE)
------------------------------------------^
mem2.f(162): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
CALL PPMON_VMTHRM(MSIN(K+2,J), MSIN(K+3,J), Y, NCP,
-------------------------------------------------------------^
mem2.f(163): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
+ IDX, NBOPST, KDIAG, KBASE, KPHI, KH, KS, KG, KV, PHI,
---------------------------------------------------------------------^
mem2.f(164): error #5276: Unbalanced parentheses
+ HMX,SMX, GMX, VMX, DPHI, CPMX, DSMX, DGMX, DVMX, KER)
-------------------------------------------------------------------^
mem2.f(168): error #6099: An ENDDO statement occurred without a corresponding DO or DO WHILE statement.
END DO
^
mem2.f(169): error #6099: An ENDDO statement occurred without a corresponding DO or DO WHILE statement.
END DO
^
mem2.f(205): error #8093: A do-variable within a DO body shall not appear in a variable definition context. [J]
DO J=1, NMATO
---------^
mem2.f(205): error #6511: This DO variable has already been used as an outer DO variable in the same nesting structure. [J]
DO J=1, NMATO
---------^
mem2.f(207): error #8093: A do-variable within a DO body shall not appear in a variable definition context. [I]
DO I=1, NUM_ROWS
-----------^
mem2.f(207): error #6511: This DO variable has already been used as an outer DO variable in the same nesting structure. [I]
DO I=1, NUM_ROWS
-----------^
mem2.f(247): error #8093: A do-variable within a DO body shall not appear in a variable definition context. [J]
DO J=1, NCD
-------------^
mem2.f(247): error #6511: This DO variable has already been used as an outer DO variable in the same nesting structure. [J]
DO J=1, NCD
-------------^
mem2.f(254): error #8093: A do-variable within a DO body shall not appear in a variable definition context. [J]
DO J=1, 9
-------------^
mem2.f(254): error #6511: This DO variable has already been used as an outer DO variable in the same nesting structure. [J]
DO J=1, 9
-------------^
mem2.f(255): error #8093: A do-variable within a DO body shall not appear in a variable definition context. [I]
I=NCD+J
------------^

I have checked if I didn't overcome the column 72 in my code. If you have any suggestions or tips feel free.
Thanks in advance.

RE: Fortran error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * )

You've got a F77 program - the code needs to start in column 7, and continuation lines in column 6
eg

CODE

DO I=1, NUM_ROWS
         IF (I .EQ. K1) then 
             CALL SHS_CPACK(MSIN(1,J), NCP, IDX, Y, FLOW)
             KDIAG=4
             K= NCOMP_NCC
             CALL PPMON_VISCV(MSIN(K+2,J), MSIN(K+3,J), Y, NCP,
     +          IDX, NBOPST, KDIAG, 
     +          INSTREAM(OFFSET+I), RETCODE)
         ELSE 
It would also help readability if you indent your code

RE: Fortran error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * )

(OP)
Thank you for your help, I have corrected my continuation lines and now it works

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close