Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!linus!alliant!tj From: tj@Alliant.COM (Tom Jaskiewicz) Newsgroups: comp.lang.fortran Subject: Re: Cheating on the types Message-ID: <4554@alliant.Alliant.COM> Date: 21 Mar 91 02:11:42 GMT References: <1991Mar20.195732.15376@appmag.com> Organization: Alliant Computer Systems Corp. Lines: 29 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. } } program wrong } real rin, rout } rin= 0.577215665 ! or whatever... } call icopy(rin, rout) } write(6,*) rout } end } } subroutine icopy(iin, iout) } integer iin, iout } iout= iin } return } end } }Seems fairly innocuous, though. Q: are there implementations }where it would fail ? 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). -- ########################################################################## # The doctrine of nonresistance against arbitrary power, and oppression is # absurd, slavish, and destructive of the good and happiness of mankind. # -- Article 10, Part First, Constitution of New Hampshire