Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!umd5!uflorida!novavax!hcx1!hcx2!bill From: bill@hcx2.SSD.HARRIS.COM Newsgroups: comp.lang.fortran Subject: Re: fortran problem Message-ID: <44400020@hcx2> Date: 13 Jun 88 15:39:00 GMT Lines: 40 Nf-ID: #R:<8806111222.AA06982@jade.berkele:-38:hcx2:44400020:000:1973 Nf-From: hcx2.SSD.HARRIS.COM!bill Jun 13 11:39:00 1988 /* Written 8:22 am Jun 11, 1988 by AER7101@TECHNION.BITNET.UUCP in hcx2:comp.lang.fortran */ /* ---------- "fortran problem" ---------- */ > Hello, > I have some questions concerning a bug (or as I call it, when it > bares the name of a big manufacturer, an undocumented feature..). > I ran the following program on several machines. There is "some problem" > with the program, as in the subroutine, an attempt is made to redefine > a constant. > Naively enough, I expected to get a reasonably clear message in English, > > Can anyone tell me if/what the ANSI standard "says" to such a situation? > How about the 8x draft ? /* End of text from hcx2:comp.lang.fortran */ The Standard says (Section 15.9.2), "Actual arguments may be constants, symbolic names of constants, function references, expressions involving operators, and expressions enclosed in parentheses if and only if the associated dummy argument is a variable that is not defined during execution of the referenced external procedure." The 8x draft says essentially the same thing, in quite a different way, but it also (at least, at the moment) provides you with INTERFACE blocks that can declare the INTENT of each argument, giving the compiler the opportunity of giving a more meaningful error message in this situation. If you choose not to use INTERFACE, though, you're back to F77. As has been pointed out about a zillion times, the Standard says absolutely nothing about what errors the FORTRAN processor (compiler, linker, loader, et al.) must give for programs that violate some restriction other than a syntax rule. It says only what is a standard-conforming program; non-conforming programs may or may not be detected. If they are detected, the Standard says nothing about what the error message (if any) must say. Bill Leonard (member, X3J3) Harris Computer Systems Division 2101 W. Cypress Creek Road Fort Lauderdale, FL 33309 bill@ssd.harris.com or bill%ssd.harris.com@eddie.mit.edu