Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!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 Summary: Cheaters sometimes get caught Message-ID: <10146@exodus.Eng.Sun.COM> Date: 20 Mar 91 21:24:24 GMT References: <1991Mar20.195732.15376@appmag.com> Sender: news@exodus.Eng.Sun.COM Lines: 28 In article <1991Mar20.195732.15376@appmag.com>, pa@appmag.com (Pierre Asselin) writes: > This simplified fragment violates the standard by passing reals to a > routine that expects integers. > > real rin, rout > call icopy(rin, rout) > . . . > subroutine icopy(iin, iout) > integer iin, iout > > Seems fairly innocuous, though. Q: are there implementations > where it would fail ? > Yes. The Burroughs linkers on their old large systems B6700-B7900, etc. used to catch this. I don't know what they do now about such things, but I think the trend is to do more checking of this sort along with global oprimization, so I would not recommend doing this (or anything else nonstandard) unless you really need to. -- Walt Brainerd Sun Microsystems, Inc. wsb@eng.sun.com MS MTV 5-40 Mountain View, CA 94043 415/336-5991