[Info-vax] Text processing examples with Fortran requested

glen herrmannsfeldt gah at ugcs.caltech.edu
Tue Nov 17 12:21:45 EST 2009


Ken Fairfield <ken.fairfield at gmail.com> wrote:
(snip, someone wrote)
 
>> I do recall that programs coded in IBM Fortran needed a little "touching
>> up" before it would compile and run on the VAX.
 
> The codes I saw on the IBM mainframes of the day did really dirty
> tricks.  Not just stuffing character data into REAL*8 <sic> variables,
> (because FORTRAN G & H didn't support CHARACTER), but changing
> the value of literal constants(!) to control program execution,
> something that triggers an ACCVIO on VAX.  I can't recall all the 
> stuff, but as a naive grad student, I was blown away with disgust 
> when I saw that...

One Fortran feature that I never used was the ability to read into
the H format descriptor:

      READ(5,1)
      WRITE(6,1)
1     FORMAT(30Hthis text will be overwritten!)

Otherwise, I don't believe that you are supposed to change constants,
numeric or not.

K&R C allowed changing of character constants, though that feature
was removed in the ANSI standard, it is still supported by some
compilers.

-- glen 



More information about the Info-vax mailing list