Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!haven!umbc3!mbph!hybl From: hybl@mbph.UUCP (Albert Hybl Dept of Biophysics SM) Newsgroups: comp.lang.fortran Subject: Re: Character aliases are Satanic extensions Summary: X3J3 scores a perfect 10.00 Message-ID: <594@mbph.UUCP> Date: 12 May 89 17:13:59 GMT References: <592@mbph.UUCP> <177@csun1.UUCP> Organization: University of Maryland, School of Medicine, Baltimore, MD 21201 Lines: 78 From article <177@csun1.UUCP> by weyrich@csun1.UUCP (Orville Weyrich): > What you describe was correct FORTRAN-66, ... FORTRAN is a permissive > standard that stresses what is required to be supported. It does not > prohibit the support of extensions or anachronisms as long as they do > not directly conflict with required features. The ANSI X3.9-1978 FORTRAN language standard is explicit in the definition of integer, real, double precision and character types. Nowhere in the X3.9 standard is there any hint that integer, real or double precision variables can serve as character aliases. Indeed, to do so would directly contravene the type definitions. The standard has been in place for more than ten year. The character type statement was intended to supplant the multitude of aliases used in the then existing FORTRAN compilers. Do you think that the following program will will produce the answer: '120_miles' ? It compiles without diagnostics on a VAX! :-( double precision distance, time, speed time='2_hours' speed='60_mph' distance=time*speed print *, distance end The programs I am porting bear dates 1984-1986 not 1974. Perusal of the colorful VAX VMS FORTRAN Language Reference Manual divulges a description _with examples_ on how to use the Satanic character aliases. The description is not relegated to an appendix nor does it discourage the continued use of such coding. The implementors of the VAX VMS FORTRAN should be excoriated for promoting the perpetuation of such anachronistic coding practices. The _NEW WORLD DICTIONARY_ defines "standard" as (1) any figure or object, esp, a flag or banner, used as an emblem or symbol of a leader, people, military unit, [fortran language implementor], etc ... (2) something established for use as a rule or basis of comparison in measuring or judging capacity, quantity, content, extent, value, quality, [portability, readability, maintainability] ... Do you think that the second definition applies to the X3.9 FORTRAN language standard? Then read the following snippet. It was carefully crafted by the acolytes of Mammon. Although it provides me with the opportunity to rate different FORTRAN implementations in a demolition derby, it is the cause of the poor portability of FORTRAN programs. The X3J3 committee scores a perfect 10.00 for allowing implementors to add his/her flag to their products. Have you tried to install a VWvan wheel or glow plug on an International Harvester Travelall? : 1.3.2. _Exclusions_. This standard does not specify: : [...] : (4) The results when the rules of this standard fail : to establish an interpretation. : and: : 1.4. _Conformance_ : [...] : A processor conforms to this standard if it executes : standard-conforming programs in a manner that fulfills the : interpretations prescribed herein. A standard-conforming : processor may allow additional forms and relationships : provided that such additions do not conflict with the : standard forms and relationships. [...] >I agree that a filter program that removes anachronisms would be >nice, ... But it is not an easy task. ... Would it be challenging as a computer science project? I think I would like to see several user selectable exorcisms. They should be written in a portable language--like C, awk, SNOBOL or ICON :-)/2 ---------------------------------------------------------------------- Albert Hybl, PhD. Office UUCP: uunet!mimsy!mbph!hybl Department of Biophysics Home UUCP: uunet!mimsy!mbph!hybl!ah University of Maryland CoSy: ahybl School of Medicine Baltimore, MD 21201 Phone: (301) 328-7940 (Office) ----------------------------------------------------------------------