Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!ubc-cs!alberta!mts.ucs.UAlberta.CA!Al_Dunbar From: userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) Newsgroups: comp.lang.fortran Subject: Re: Cheating on the types Message-ID: Date: 22 Mar 91 03:51:40 GMT References: <1991Mar20.195732.15376@appmag.com> Organization: MTS Univ of Alberta Lines: 30 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 ? > Fail to do what? Compile? Do what _you_ think it should do, which is hard to determine since you have written a non- conforming program (i.e. the standard says it is wrong, but does not dictate what it should do). -------------------+------------------------------------------- Al Dunbar | Edmonton, Alberta | Disclaimer: "I disclaim disclaimers" CANADA | -------------------+-------------------------------------------