Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwvax!dogie.macc.wisc.edu!csd4.milw.wisc.edu!zdenko From: zdenko@csd4.milw.wisc.edu (Zdenko Tomasic) Newsgroups: comp.lang.fortran Subject: Re: Character aliases are Satanic extensions Summary: integers are safer than reals, but still nonportable Keywords: Using SAP inclusions Message-ID: <2718@csd4.milw.wisc.edu> Date: 1 Jun 89 03:19:37 GMT References: <598@mbph.UUCP> <599@mbph.UUCP> <600@mbph.UUCP> Sender: news@csd4.milw.wisc.edu Reply-To: zdenko@csd4.milw.wisc.edu (Zdenko Tomasic) Organization: University of Wisconsin-Milwaukee Lines: 19 Real/double precision/complex types are susceptable to normalization but integer ones are not, i.e. if you really must store characters in noncharacter types use integer type. On the other hand the integer size is implementation dependent, so doing the above is nonportable (there are machines with 2,4,6,8,10,.. etc bytes per integer). It is exactly for the latter reason that the CHARACTER type is invented. It pushes implementation part of the problem onto the compiler writer, so the source does appear implementation independent, i.e. portable (e.g. CHARACTER*11 will always behave as storing 11 characters regardless of the underlying word size). -- ___________________________________________________________________ Zdenko Tomasic, UWM, Chem. Dept., P.O. Box 413, Milwaukee, WI 53201 UUCP: uwvax!uwmcsd1!uwmcsd4!zdenko ARPA: zdenko@csd4.milw.wisc.edu