Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!exodus!boise.Eng.Sun.COM!wsb From: wsb@boise.Eng.Sun.COM (Walt Brainerd) Newsgroups: comp.lang.fortran Subject: Re: Cheating on the types Message-ID: <10205@exodus.Eng.Sun.COM> Date: 21 Mar 91 16:43:23 GMT References: <1991Mar20.195732.15376@appmag.com> <4554@alliant.Alliant.COM> Sender: news@exodus.Eng.Sun.COM Lines: 23 In article <4554@alliant.Alliant.COM>, tj@Alliant.COM (Tom Jaskiewicz) writes: > > Yes. It been 10 years since I've used one, but there is at least one > Fortran implementation that uses 16 bit INTEGER's and 32 bit REAL's. > (this in itself violates Fortran-77). > This is NOT, by itself, a violation of the Fortran 77 standard; the standard says nothing about how values are stored. It DOES say how equivalence and common (for example) must work, so if those things don't work correctly, the implementation is not correct. But testing if some kind of illegal "cheating" on types (such as using mismatched arguments or assigning a value to a real and using an equivalenced integer) works is not a legitimate way to determine this. (BTW, I would say that if 16-bit integers and 32-bit reals are the only ones available, an implementation would have a very difficult time making equivalence and common work correctly.) -- Walt Brainerd Sun Microsystems, Inc. wsb@eng.sun.com MS MTV 5-40 Mountain View, CA 94043 415/336-5991