Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!cs.utexas.edu!uunet!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: Equivalencing Characters Laid to Rest Message-ID: <4678@goanna.cs.rmit.oz.au> Date: 31 Jan 91 07:53:28 GMT References: <11514@helios.TAMU.EDU> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 27 In article <11514@helios.TAMU.EDU>, mkh6317@summa.tamu.edu (HOWARD, MATTHEW KENDALL) writes: > I'd like to collectively thank those individuals who took the > time to kindly explain why equivalencing a character variable > to a numeric variable violates the standard. > In short, portability. I'd just like to add an anecdote. The one time I had to do some paid work in Fortran it involved porting a program *from* a FIVE character per "word" machine (BCD code, I think) *to* a FOUR character per "word" machine (ASCII) *through* a SIX character per "word" machine (EBCDIC) One rather nasty point was that not all bit-patterns were valid integers on the six-char-per-word machine, so that INTEGER FRED DATA FRED/'ABCDE'/ FRED = FRED+0 could blow up. Precisely one thing saved me: the 6 char per word machine was a Burroughs B6700 and the compiler had a directive "$CHARS = n" which told the compiler and the formatted I/O library to pretend that words held only n bytes. To this day I have no real hope that I got that conversion right. -- The Marxists have merely _interpreted_ Marxism in various ways; the point, however, is to _change_ it. -- R. Hochhuth.