Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!emx.utexas.edu!mclay From: mclay@vato.ae.utexas.edu (Robert McLay) Newsgroups: comp.lang.fortran Subject: max function in dim. stmt in sun f77 1.3.1 Message-ID: Date: 5 Feb 91 16:30:05 GMT Sender: news@ut-emx.uucp Distribution: comp Organization: CFD Lab, Dept ASE-EM, University of Texas at Austin Lines: 37 Under sun f77 v1.3.1 it now complains about the use of the max function in an adjustable array dimension statement. This use to work in version 1.2 and before. Namely here is the code program junk integer a(10000) n = 0 call abc (a(1),100,a(100),n) end subroutine abc(a,m,g,n) integer a(m),g(max(1,n)) a(1) = 1 return end In the actual case n is sometimes zero and some time not. This does work on vax vms fortran and cray fortran. What is surprising is that it use to work in sun f77 v1.2. I know that there are ways around it, but in the actual case this is the best way to do it. -- ______________________________________________________________________________ Robert McLay | When you have a problem, put NO in front of Manager CFD Lab | it and you have: NO PROBLEM. Dept ASE-EM | University of Texas at Austin | -- Eric Beckman's 2nd Law | mclay@wilbur.ae.utexas.edu |