Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unterminated block

Status
Not open for further replies.

yusun9

Programmer
Joined
Dec 23, 2004
Messages
1
Location
US
Hi,

when I compile a program, I encountered the following error:


ifc -O3 -tpp7 -132 -axW -w95 -cm -c usersb.f
ifc: warning: The Intel Fortran driver is now named ifort. You can suppress this message with '-quiet'
fortcom: Error: usersb.f, line 277: Syntax error, found END-OF-FILE when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM TYPE COMPLEX BYTE CHARACTER ...
if ( XC .gt. WX_MAX ) then
.................................^
fortcom: Error: usersb.f, line 277: An unterminated block exists.
if ( XC .gt. WX_MAX ) then




In the usersb.f, the corresponding code is as follows, I don't see any problem, can anybody help me out ?

Code:
      if ( XC .gt. WX_MAX )  then 
          QOUTBX = .true.
          xdiff =  - 2*(XC - WX_MAX)
      else if ( XC .lt. WX_MIN ) then
          xdiff =  2*(WX_MIN - XC)
          QOUTBX = .true.
      endif


Thanks!

Yu
 
The problem is probably before that statement.

If this is F77, do you have a continuation character in the wrong column?

If it is F90/95, end all your subroutines/functions with the function names. eg
Code:
subroutine FRED
...
end subroutine FRED
This will help track down your problem. Another possibility is a trailing & which may cancel out the next line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top