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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with compile error

Status
Not open for further replies.

ctlin

Technical User
Apr 17, 2002
77
US
here is the piece of code that seems to be generaing an error on comile in Compaq Visual Fortran...
-------------
COMPLEX*16 A(NDIM,NDIM),PIVOT(600),AMAX,T,SWAP,U,DETERM
INTEGER IPIVOT(600),INDEX(600,2)
REAL*8 COND,TEMP,ALPHA(600),SUMAXA,SUMROW
IMPLICIT REAL*8 (A-H,O-Z)
--------------

I get this error message on compile:

Error: This IMPLICIT statement is not positioned correctly within the scoping unit.
IMPLICIT REAL*8(A-H,O-Z)


I'm completely new at Fortran: what do i need to fix here?
 
Hi ctlin

Put the IMPLICIT statement at the beginning of the "scoping unit" (program, subroutine, etc).

Hope this helps. CaKiwi
 
thanks, it worked sorta (that error got fixed but 6 new ones appeared). moving on to other (simpler) things:

what does the type declaration "Real*some number" mean as opposed to just a "Real" declaration. something to do with array structure right?
 
Hi again ctlin,

Real by itself defines a real number with the default precision specified by a compiler option. If no compiler option is used, it defaults to real*4 for Compaq fortran. Real*4 and Real*8 explicitly define 4 byte (single precision) or 8 byte (double precision) real numbers, respectively.

Hope this helps. CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top