Path: utzoo!utgpu!attcan!uunet!lll-winken!ames!killer!mic!d25001 From: d25001@mic.UUCP (Carrington Dixon) Newsgroups: comp.lang.fortran Subject: Re: An exercise in futility Keywords: uppercase lowercase standard Message-ID: <211@mic.UUCP> Date: 13 Jan 89 02:55:46 GMT References: <585@mbph.UUCP> <207@mic.UUCP> <3131@ttrdc.UUCP> Reply-To: d25001@mic.UUCP (Carrington Dixon) Organization: Micro Net Lines: 68 > levy@ttrdc.UUCP (Daniel R. Levy) writes: >In article <207@mic.UUCP>, d25001@mic.UUCP (Carrington Dixon) writes: >> The X3.9-1978 not only mandates that identifiers be >> no more than six characters long; it also defines the character set as >> consisting _ONLY_ of the UPPER-CASE letters. >Could someone please quote chapter and verse. The paper "A Portable FORTRAN >77 Compiler", by Feldman and Weinberger, seems to imply a reading of the >standard that calls for a monocase alphabet but doesn't specify what case. Gladly, today we take our text from Chapter Three of the Book of ANSI X3.9-1978, verses 3.1 and 3.1.1: 3.1 FORTRAN Character Set The FORTRAN character set consists of twenty-six letters, ten digits, and thirteen special characters. 3.1.1 Letters A letter is one of the twenty-six characters: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z This rules out the use of two distinct cases a la C or Modula-2 pretty certainly. I would have thought that it was pretty definite about which case to use too; even though it does not use the terms upper- or lower-case in this area. It has listed the characters that it defines as letters and they are all UPPERCASE. I would be interested to learn how Feldman and Weinberger justified their contention that the standard leaves the selection of case undefined. [IMHO a standard that mandated a single case and then neglected to define which case would be _seriously_ defective. The authors of X3.9-1978 do not appear to have been negligent in this regard.] The only explicit mention of case that I found in a hurried look through the standard was in Section 1.5, Notation Used in This Standard: (1) Special characters from the FORTRAN character set, uppercase letters, and uppercase words are to be written as shown, except where otherwise noted. (2) Lowercase letters and lowercase words indicate general entities for which specific entities must be substituted in actual statements. ... >This shows (in the UNIX f77 compiler, which resulted from Feldman and Wein- >berger's work) in the mapping of uppercase identifiers to lowercase for the >linker, and the fact that lowercase values are expected for parameters in >statements like OPEN(UNIT=1,STATUS='scratch') and lowercase values are >returned by statements like INQUIRE(UNIT=1,ACCESS=CHRSTR). For all I know >this is an erroneous interpretation, but they don't seem to think so (they >name the only three ways they think their compiler deviates from the standard, >and case handling isn't among them). It's a pain in porting code, obviously. This may be more in keeping with the way that UNIXphiles like to code, but I am afraid that it is in violation of what appears (to me at least) to be the plain wording of the standard. A conforming FORTRAN compiler may _allow_ lowercase values in these instances but one that _requires_ them is not conforming as I understand the term. Incidentally, I am NOT trying to defend the use of only uppercase beyond pointing out that those who wish to abhor all that is not allowed by the standard must be prepared to forego lowercase. Lowercase may be more esthetically pleasing and easier to type, etc., but it is not X3.9-1978 conforming. Carrington Dixon UUCP: { convex, killer }!mic!d25001