Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!uwvax!tank!mimsy!cvl!haven!umbc3!mbph!hybl From: hybl@mbph.UUCP (Albert Hybl Dept of Biophysics SM) Newsgroups: comp.lang.fortran Subject: Character aliases are Satanic extensions Keywords: Exorcist needed Message-ID: <592@mbph.UUCP> Date: 9 May 89 22:28:50 GMT Organization: University of Maryland, School of Medicine, Baltimore, MD 21201 Lines: 54 I am converting a set of programs containing a total of about 60,000 line of "standard" fortran code written for a VAX computer. The following is typical of several hundred diagnostics I have encountered: DOUBLE PRECISION NAME,NAMA,JTYPM,ISPEC DATA IDNA,IRNA,ISPEC/4HD ,4HR ,8H$SPECIAL / 98. *********** DATA IDNA,IRNA,ISPEC/4HD ,4HR ,8H$SPECIAL / <=== ***** Error number 78 in line 98 of file nucgen.for ***** ***** Type conflict in DATA statement ***** VMS fortran allows a user to enter character data typed as logical, byte, integer, real, double precision, dimension, probably complex and the proper character type "character." VMS fortran allows character data to be assigned to these alias types by arithmetic assignment or by a data statement or non character functions or by using the read statement. The use of these Satanic extensions by the VMS implementation of Fortran scores a 9.73 in the Fortran demolition derby; it is a robust attempt to demolish the concept of typing! My compiler quite logically expects character data to be typed "character." It is real shame that FORTRAN is not a standardized language! Being philosophical about this, I am reminded of the opening words in "The Tale of Two Cities" by Charles Dickens: "It was the best of times, it was the worst of times, ..." VMS fortran is the best of compilers, it is the worst of compilers; a language standard is intended to promote portability, it is intended to promote profitability, ... The VAX implementation gives new meaning to the term garbage collection. Mixing good standards with bad and ugly non standard statements scrounged from old compilers is an example of misoneism. It will compiles everybodies old code. The basic idea is valid; however, the incorporation of the garbage collector in a standards conforming compiler is not. What is needed is an Exorcist section appended to the standard. For example, I could have used an exorcism that retyped the logical, real, double precision, and byte aliases for character variables as truly character--not an easy task. The Exorcist should produce a new source deck. I think that it would be easier to depreciate old features from a language if an Exorcist existed to do the job; especially a public domain Exorcist. ---------------------------------------------------------------------- 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) ----------------------------------------------------------------------