Intrinsic functions in Fortran g77

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I have a problem with g77 which - to my belief - has to do with intrinsic functions. I am trying to compile a piece of fortran code that uses the intrinsic function MAX(). When doing this, I get the following error messages:

peppar:~/xjobb/slicot/examples> g77 -c TAB01ND.f
TAB01ND.f: In program `MAIN__':
TAB01ND.f:14:
PARAMETER ( LDWORK = MAX( NMAX, 3*MMAX ) )
^
Invalid declaration of or reference to symbol `max' at (^) [initially seen at (^)]
TAB01ND.f:14:
PARAMETER ( LDWORK = MAX( NMAX, 3*MMAX ) )
1
TAB01ND.f:30: (continued):
INTRINSIC MAX
2
Invalid declaration of or reference to symbol `max' at (2) [initially seen at (1)]
TAB01ND.f:22:
$ DWORK(LDWORK), TAU(NMAX), Z(LDZ,NMAX)
1
TAB01ND.f:33: (continued):
WRITE ( NOUT, FMT = 99999 )
2
Invalid declaration of or reference to symbol `dwork' at (2) [initially seen at (1)]


Now, MAX() is declared a intrinsic function as seen in the follwing code (this is the first lines in the file I'm trying to compile - TAB01ND.f):
* AB01ND EXAMPLE PROGRAM TEXT
* RELEASE 4.0, WGS COPYRIGHT 1999.
*
* .. Parameters ..
INTEGER NIN, NOUT
PARAMETER ( NIN = 5, NOUT = 6 )
INTEGER NMAX, MMAX
PARAMETER ( NMAX = 20, MMAX = 20 )
INTEGER LDA, LDB, LDZ
PARAMETER ( LDA = NMAX, LDB = NMAX, LDZ = NMAX )
INTEGER LIWORK
PARAMETER ( LIWORK = MMAX )
INTEGER LDWORK
PARAMETER ( LDWORK = MAX( NMAX, 3*MMAX ) )

* .. Local Scalars ..
DOUBLE PRECISION TOL
INTEGER I, INFO, INDCON, J, M, N, NCONT
CHARACTER*1 JOBZ
* .. Local Arrays ..
DOUBLE PRECISION A(LDA,NMAX), B(LDB,MMAX),
$ DWORK(LDWORK), TAU(NMAX), Z(LDZ,NMAX)
INTEGER IWORK(LIWORK), NBLK(NMAX)
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* .. External Subroutines ..
EXTERNAL AB01ND, DORGQR
* .. Intrinsic Functions ..
INTRINSIC MAX
* .. Executable Statements ..
*

.... More code follows ....



Can you help me, please? Best wishes, Rikard Skelander

........Rikard Skelander............rikard@xxxxxxxxxxxxxxxxxxxxxxxx
........Axtorpsvägen 21B, 3tr.......http://www.cs.umu.se/~rikard...
........903 37 Umeå.................Phone@home: +46 (0)90 774144...
........Sweden......................Cellular  : +46 (0)70 6654072..


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux