Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!lll-winken!aunro!alberta!mts.ucs.UAlberta.CA!Al_Dunbar From: userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) Newsgroups: comp.lang.fortran Subject: Re: Pseudo-FORTRAN -- f2c for the Macintosh Message-ID: Date: 8 Jun 91 15:16:26 GMT References: <1991May30.040829.8696@eplrx7.uucp> <1017@DIALix.oz.au> <1991Jun1.171914.802@weyrich.UUCP> <1991Jun5.220805.4653@alchemy.chem.utoronto.ca> Organization: MTS Univ of Alberta Lines: 34 In article <1991Jun5.220805.4653@alchemy.chem.utoronto.ca>, mroussel@alchemy.chem.utoronto.ca (Marc Roussel) writes: >In article <1991Jun1.171914.802@weyrich.UUCP> orville@weyrich.UUCP >(Orville R. Weyrich) writes: >[on using EQUIVALENCE with variables of differing types] >>This leads to the $500,000 question: do algorithms exist which can do something >>intelligent with such uses of EQUIVALENCE? >> >>YES, I WOULD BE VERY INTERESTED IN THE ANSWER TO THE ABOVE QUESTION. > >I can see one possible legitimate use of EQUIVALENCE with different data >types: to decide on the endianism of your machine (and similarly to decide >other quirks of the number system of the computer). You can load up some >variables with known values, equivalence them to appropriate-sized integers >and then use these integers to diagnose the endianism (round-off, etc.). Such >diagnostic toolkits are probably the only legitimate use of equivalence >across data types though (other than saving space). Anyone know any others? > While you might be able to infer _some_ such information from _some_ machines, I doubt that any code you write would necessarily work on _all_ machines. A CDC Cyber xxx (I forget the number) has 60=bit integers, and does _not_ use two's complement arithmetic. I am not sure if its Fortran even supports shorter integers. EQUIVALENCE is an idea whose time has come and gone; or at least will be gone when Fortran 90 arrives with its TRANSFER function. -------------------+------------------------------------------- Al Dunbar | Edmonton, Alberta | Disclaimer: "not much better than CANADA | datclaimer" -------------------+-------------------------------------------